Glpi: Mailgate encoding error (9.5.0 & 9.5.1)

Created on 16 Jul 2020  路  19Comments  路  Source: glpi-project/glpi

Hi! Its a bug?
We have a mail collector since 9.x.x versions. And everything worked fine. But when I upgrade glpi to 9.5.0, mailgate task send email witn wrong encoding. After that I upgraded to 9.5.1, but problem still remains
image
emails with incorrect encoding (only body) are also sent to your email address
no errors in logs,
eml file
eml.txt
system info
sysinfo.txt

bug

Most helpful comment

Hi,

I just updated #7748. I was now able to made tests locally and encoding seems correct to me.

Regards

I confirm fixed file work fine, for me problem is solved. Thank you!

All 19 comments

This sounds like a bug yes.

Unfortunately, the provided eml file does not work in our tests suite; seems there is an issue in the headers (date is present, but cannot be found). Could you please check the uploaded file is correct?

This one works, thanks :)

Maybe I have answered a bit too fast... In facts, I'm not able to import this message (it's well formatted now, but this seems to be a notification email sent from GLPI, those kind of emails are blacklisted at import).

I've just tried with a content of mine contains french and cyrillic characters, I've not reproduced the issue; so there is something in the email itself that make things goes wrong.

I've spent more than an hour trying to reproduce without succes. We'll need the original email that was collected.

emls.zip
Hello! Look, this is emails that send to server mailbox-collector. Note, that one of them delivered later (to glpi & to admin addresses) CORRECTLY (this-is-correct-from-iphone.eml)!
image
(........=)))

The difference is, that in correct email body is in base64
image
I.DON`T.KNOW

Not sure this is the base64, the working one uses UTF-8, while others don't (windows-1251 and koi8-r); that also may be the cause.

I'll try with new provided data, thank you.

So, I've been able to import one of those, but I'm absolutely not sure about the results. I'm lost with all those headers, encodings, and also with html/non html: I really do not know what to expect.
I've already spent hours on that without results, I give up.

I`ll try to understand what happens too, but the problem exists =)

I confirm the same issue after upgrading from 9.4.6 to 9.5.1
懈蟹芯斜褉邪卸械薪懈械

I confirm the same issue with KOI8-R charset in mailcollector.php after upgrading from 9.4.6 to 9.5.1
image

Hi,

Can you try to apply commit 124a435f10a38b6c942acb28bf2a413d9170bc65 ? I tried to reproduce the 9.4 logic on content decoding.

Regards

Hi,

Can you try to apply commit 124a435 ? I tried to reproduce the 9.4 logic on content decoding.

Regards

Dear Cedric I downlaod this file https://github.com/glpi-project/glpi/blob/124a435f10a38b6c942acb28bf2a413d9170bc65/inc/mailcollector.class.php and replace my current mailcollector.class.php but problem still same

image

Hello! found a solution to the problem?

Hi,

I just updated #7748. I was now able to made tests locally and encoding seems correct to me.

Regards

Hi,

I just updated #7748. I was now able to made tests locally and encoding seems correct to me.

Regards

I confirm fixed file work fine, for me problem is solved. Thank you!

@cedric-anne hello! Yes, your commit is fixed the issue. I replace only one file named mailcollector.class.php, and encoding of russian email became correct! Thank you very much!

Hello, i replace the file mailcollector.class.php with the last commit (17bc1ec ) but the problem still the same when email is sending by outlook in HTML. The Image content in the body don't appear. When the same email is send with webmail the contetn appear correctly.
image

image

What can i do now???
Thanks

Hello, i replace the file mailcollector.class.php with the last commit (17bc1ec ) but the problem still the same when email is sending by outlook in HTML. The Image content in the body don't appear. When the same email is send with webmail the contetn appear correctly.
image

image

What can i do now???
Thanks

Hi,

Please open another issue. Your issue seems different from the one discussed on this thread.
To help us debugging, please export your email into eml format and attach it to the issue you will create.

Regards

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zoriax picture zoriax  路  4Comments

dvinkic picture dvinkic  路  6Comments

Aijt picture Aijt  路  6Comments

menvol3 picture menvol3  路  7Comments

trasher picture trasher  路  4Comments