Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailgate encoding error (9.5.0 & 9.5.1) #7709

Closed
sazanof opened this issue Jul 16, 2020 · 20 comments
Closed

Mailgate encoding error (9.5.0 & 9.5.1) #7709

sazanof opened this issue Jul 16, 2020 · 20 comments
Assignees
Labels
Milestone

Comments

@sazanof
Copy link

sazanof commented Jul 16, 2020

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

@trasher
Copy link
Contributor

trasher commented Jul 16, 2020

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?

@sazanof
Copy link
Author

sazanof commented Jul 16, 2020

yea, this is correct eml

[GLPI #1710313213] New Ticket тест2.zip

@trasher
Copy link
Contributor

trasher commented Jul 17, 2020

This one works, thanks :)

@trasher
Copy link
Contributor

trasher commented Jul 17, 2020

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.

@sazanof
Copy link
Author

sazanof commented Jul 17, 2020

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
(........=)))

@sazanof
Copy link
Author

sazanof commented Jul 17, 2020

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

@trasher
Copy link
Contributor

trasher commented Jul 17, 2020

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.

@trasher
Copy link
Contributor

trasher commented Jul 17, 2020

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.

@sazanof
Copy link
Author

sazanof commented Jul 17, 2020

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

@neutrolino
Copy link

I confirm the same issue after upgrading from 9.4.6 to 9.5.1
изображение

@bubsik
Copy link

bubsik commented Jul 21, 2020

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

@cedric-anne
Copy link
Member

Hi,

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

Regards

@bubsik
Copy link

bubsik commented Jul 21, 2020

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

@lustiness
Copy link

Hello! found a solution to the problem?

cedric-anne added a commit to cedric-anne/glpi that referenced this issue Jul 23, 2020
@cedric-anne
Copy link
Member

Hi,

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

Regards

@cedric-anne cedric-anne self-assigned this Jul 23, 2020
@cedric-anne cedric-anne added this to the 9.5.2 milestone Jul 23, 2020
@bubsik
Copy link

bubsik commented Jul 23, 2020

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!

@sazanof
Copy link
Author

sazanof commented Jul 23, 2020

@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!

@gcastellarin
Copy link

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

@cedric-anne
Copy link
Member

cedric-anne commented Jul 29, 2020

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

@NegroniBlast
Copy link

Hey guys, how do I know if the encoding fixes were included in later versions? I installed GLPI 10.0.12 and after connecting via 0auth i tried opening tickets via email with hebrew characters and I get gibberish instead.

Screenshot 2024-07-01 at 14 07 51

@glpi-project glpi-project locked as resolved and limited conversation to collaborators Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants