Page 1 of 1

POP3 Fetching stops working when using german umlaut äöüß in "mail from"

Posted: Tue Apr 11, 2017 8:52 am
by Kaffeeopfer
Script URL: hesk_pop3.php
Version of script: HESK 2.7.2
Hosting company: LOCAL
php: 7.0.15
MySQL-Version: 5.7.17
What terms did you try when SEARCHING for a solution: POP3, UMLAUT, Email-to-Ticket, Parsing

POP3 Fetching works fine until a user with umlaut in "mail from" sends a ticket.

Here in this example
User Jürgen P**** send to IT.Ticket@******.de

The mail header looks like this

Received: from mail.******.local ([::1]) by
mail.******.local ([::1]) with mapi id 14.03.0319.002; Mon, 10
From: =?iso-8859-1?Q?P****=2C_J=FCrgen?= <Juergen.P****@******.de>
To: IT Ticket <IT.Ticket@******.de>
Subject: Testmail....
Thread-Topic: Testmail....

The debug of
******/inc/mail/hesk_pop3.php
shows:

#!/usr/bin/php -q
Connected to the POP3 server "mail.******.local".
User "IT.Ticket" logged in.
There are 2 messages in the mail box with a total of 10301 bytes.
Parsing message 1 of 2.



While parsing the mail ist stops working.
Is it possible to change the parsing options to except german umlaute?

Thanks a lot
Kaffeeopfer

Re: POP3 Fetching stops working when using german umlaut äöüß in "mail from"

Posted: Tue Apr 11, 2017 5:54 pm
by Klemen
Please send a sample email with this problem to pop3test ...at... hesk ...dot... com and I will have a look.

Re: POP3 Fetching stops working when using german umlaut äöüß in "mail from"

Posted: Wed Apr 12, 2017 7:18 am
by Kaffeeopfer
Testmail was send
Sender: Jürgen.P****@******.de

Re: POP3 Fetching stops working when using german umlaut äöüß in "mail from"

Posted: Wed Apr 12, 2017 6:29 pm
by Klemen
It imported just fine in my test setup?

Image

If you login into webmail, do you actually have 2 messages in the mailbox or only one?

Re: POP3 Fetching stops working when using german umlaut äöüß in "mail from"

Posted: Thu Apr 13, 2017 7:08 am
by Kaffeeopfer
Hello Klemen

I think it's a problem in combination with our Exchange Server
Internaly we got a "=?iso-8859-1?Q?P****=2C_J=FCrgen?= <Juergen.P****@******.de" as Sender

The testmail you got was send via our sendmail proxy after virus scanning the mail.
The sender field is reduced to "<Juergen.P****@******.de"
So there is no problem for your import.

Can you tell where the mail parsing happens ?
So I can change it on my own.

Thanks

Re: POP3 Fetching stops working when using german umlaut äöüß in "mail from"

Posted: Thu Apr 13, 2017 8:12 am
by Klemen
The "From" in the email you sent was actually set to this:

Code: Select all

From: =?iso-8859-1?Q?Pauer=2C_J=FCrgen?= <Juergen.Pauer@DELETED.de>
You can also see from the screenshot in my previous post that sender name was parsed correctly.

Files responsible for the parsing are:
- inc/mail/email_parser.php
- inc/mail/mime_parser.php
- inc/pipe_functions.inc.php