quoted-printable encoding weirdness

Hello, I discovered a problem with quoted-printable + ISO-8859-15 encoding in the OTRS subject line. I'm not sure what the source of the problem is. Setup: We received a email with a quoted-printable + ISO-8859-15 encoded subject. The mail was probably sent by MS Exchange (Microsoft SMTPSVC(5.0.2195.5329)). The Subject line is attached in the raw format received by OTRS. OTRS decodes this line as follows: "AW: [Spamverdacht] [CSC-Ticket#: 2005020810000 025] Probleme bei Übernahme der Shared Disk" Outlook 2003 decodes this subject line as follows: "AW: [Spamverdacht] [CSC-Ticket#: 2005020810000025] Probleme bei Übernahme der Shared Disk" The problem is the space character in the Ticket number. OTRS detects the followup as a new ticket instead of a follow up to an old ticket. I'm not sure were the bug is. After reading some RFC about quoted-printable mail encoding, I'm even more confused what the reason for that wrong decoding is (http://www.freesoft.org/CIE/RFC/1521/6.htm).
From my reading I understand the following:
- RFC 1512 does not cover spaces / tabs (Ascii 9 and 32) at the beginning of a line in a special way. - Spaces at the beginning of quoted-printable lines are allowed. - Spaces and Tabs at the beginning of mail headers must be avoided, because otherwise the following line will not be detected as another line belonging to the same mail header as before (e.g a a long Subject, quoted-printable encoded resulting in many lines). So there are some questions remaining regarding this problem: a) Does the standard lack a rule about spaces at the beginning of lines ? b) Is this a problem of Exchange interpreting the standard wrong ? c) Does some perl module used by OTRS decode mails wrong ? The strange thing is, that Outlook (also an MS product) decodes the mail in the correct way. This may be because Exchange and Outlook both interpret the standard wrong. Can someone give me a hint were to fix this ? (Mail Perl Modules, OTRS (TicketNumberGenerator), Exchange etc.) Bye, Robert Heinzmann =?iso-8859-15?Q?AW=3A_=5BSpamverdacht=5D_=5BCSC-Ticket=23=3A_2005020810000?= =?iso-8859-15?Q?025=5D_Probleme_bei____=DCbernahme____der_Shared_Disk?=

Hi Robert, Robert Heinzmann wrote:
I discovered a problem with quoted-printable + ISO-8859-15 encoding in the OTRS subject line. I'm not sure what the source of the problem is.
Setup: We received a email with a quoted-printable + ISO-8859-15 encoded subject. The mail was probably sent by MS Exchange (Microsoft SMTPSVC(5.0.2195.5329)). The Subject line is attached in the raw format received by OTRS. OTRS decodes this line as follows:
"AW: [Spamverdacht] [CSC-Ticket#: 2005020810000 025] Probleme bei Übernahme der Shared Disk"
Outlook 2003 decodes this subject line as follows:
"AW: [Spamverdacht] [CSC-Ticket#: 2005020810000025] Probleme bei Übernahme der Shared Disk"
The problem is the space character in the Ticket number. OTRS detects the followup as a new ticket instead of a follow up to an old ticket. [...]
Thats bad. :-(
I'm not sure were the bug is. After reading some RFC about quoted-printable mail encoding, I'm even more confused what the reason for that wrong decoding is (http://www.freesoft.org/CIE/RFC/1521/6.htm).
From my reading I understand the following:
- RFC 1512 does not cover spaces / tabs (Ascii 9 and 32) at the beginning of a line in a special way. - Spaces at the beginning of quoted-printable lines are allowed. - Spaces and Tabs at the beginning of mail headers must be avoided, because otherwise the following line will not be detected as another line belonging to the same mail header as before (e.g a a long Subject, quoted-printable encoded resulting in many lines).
So there are some questions remaining regarding this problem:
a) Does the standard lack a rule about spaces at the beginning of lines ? b) Is this a problem of Exchange interpreting the standard wrong ? c) Does some perl module used by OTRS decode mails wrong ?
The strange thing is, that Outlook (also an MS product) decodes the mail in the correct way. This may be because Exchange and Outlook both interpret the standard wrong.
Can someone give me a hint were to fix this ? (Mail Perl Modules, OTRS (TicketNumberGenerator), Exchange etc.)
Bye,
Robert Heinzmann
------------------------------------------------------------------------
=?iso-8859-15?Q?AW=3A_=5BSpamverdacht=5D_=5BCSC-Ticket=23=3A_2005020810000?= =?iso-8859-15?Q?025=5D_Probleme_bei____=DCbernahme____der_Shared_Disk?= ------------------------------------------------------------------------
IMO it could look like an perl MIME::Words bug. I can reproduce this problem. I updated the OTRS cpanlib MIME Tools to the current 5.417. And the problem is gone away. :) Try to download the following tar.gz an extract it in you OTRS home directory. http://demo.otrs.org/~martin/otrs-MIME-Tools-5.417.tar.gz Is the problem still there? Thanks for Feedback! :-) Martin Edenhofer -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!

Hello Martin,
Try to download the following tar.gz an extract it in you OTRS home directory.
http://demo.otrs.org/~martin/otrs-MIME-Tools-5.417.tar.gz
Is the problem still there?
thanks for input. I'm going to test this next week (holidays :). I'll keep you informed of the results. Bye, Robert p.s. Could you keep the file otrs-MIME-Tools-5.417.tar.gz on the download link below until mid next week ? Thanks.

Hi Robert, Robert Heinzmann wrote:
Try to download the following tar.gz an extract it in you OTRS home directory.
http://demo.otrs.org/~martin/otrs-MIME-Tools-5.417.tar.gz
Is the problem still there?
thanks for input. I'm going to test this next week (holidays :). I'll keep you informed of the results.
Fine! :)
Bye,
Robert
p.s. Could you keep the file otrs-MIME-Tools-5.417.tar.gz on the download link below until mid next week ? Thanks.
Sure! .-) Martin -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!

Hello Martin, the new MIMEtools work correctly. Thank you for the support and keeping the MIMEtools on the server for such a long time :) Bye, Robert Martin Edenhofer wrote:
IMO it could look like an perl MIME::Words bug. I can reproduce this problem.
I updated the OTRS cpanlib MIME Tools to the current 5.417. And the problem is gone away. :)
Try to download the following tar.gz an extract it in you OTRS home directory.
http://demo.otrs.org/~martin/otrs-MIME-Tools-5.417.tar.gz
Is the problem still there?
Thanks for Feedback! :-)
Martin Edenhofer

Hi Robert, Robert Heinzmann wrote:
the new MIMEtools work correctly. Thank you for the support and keeping the MIMEtools on the server for such a long time :)
No problem. But many thanks for feedback! :-)
Robert
Martin -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!
participants (2)
-
Martin Edenhofer
-
Robert Heinzmann