Hello,

The problem that Nikos had reported back in 2020, happened to our mailman 
installation too and since there was no resolution to Nikos initial problem, i 
thought to send our investigation results to the same thread.
So, the problem is that when someone is sending an email with a Greek subject 
(encoded with iso-8859-7), then Microsoft Exchange servers and Outlook.com are 
dropping this email with an error like the following one:
Remote Server returned '550 5.6.0 CAT.InvalidContent.Exception: 
ExchangeDataException, Decoding of header Subject failed+ADs- raw value: 
+AFs-New-mlmanagerc-testlist+AF0- +AD0-?iso8859-7?b?xO/q6ezeIDcg9OXr6ere?+AD0-; 
cannot handle content of message with InternalId 5506148083457, 
InternetMessageId <8cb41556092b9f4396d7787d8616b2f6@xxx>.'
This happens when the client computer, which sends an email to the list, is set 
to encode Greek characters according to iso-8859-7. In this case, the Subject 
of the email is encoded like this: 
Subject: =?iso-8859-7?B?xO/q6ezeIDYgdGVzdA==?=
The email is processed by mailman and a prefix is added in the Subject line, so 
it has be re-encoded. The recipients of the mailing list receive the email with 
the following Subject:
Subject: [New-testlist] =?iso8859-7?b?xO/q6ezeIDYgdGVzdA==?=

As you can observe, the initial email was sent with iso-8859-7 but it was 
finally received by the mailing list's recipients as iso8859-7 (a dash is 
missing). Exchange server identifies the iso-8859-7 string as a valid encoding 
but not the iso8859-7, so it discards the email.
By further investigation, it seems that the piece of code which makes this 
change is part of the python installation. In 
/usr/lib/python2.7/encodings/iso8859_7.py, in def getregentry(), there is a 
line:  name='iso8859-7'
which if it is changed to: name='iso-8859-7' 
then the encoding is sent correctly and the emails are received by the Exchange 
server. Nevertheless, i'm wondering if there is a better solution than changing 
the python's file, so any further thoughts are welcome.
All tests have been made with Mailman 2.1.29 on Centos7 and on Ubuntu 20.04, by 
using the standard repos.

Sarantis Papanagnou
------------------------------------------------------
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
    https://mail.python.org/archives/list/mailman-users@python.org/

Reply via email to