On 01/21/2016 10:15 AM, Mark Sapiro wrote:
>
> Here's what I think is happening.
>
> Mailman is munging the From: header from
>
> From: [email protected]
>
> to
>
> From: valérie via List <[email protected]>
>
> where valérie comes from the member's name field in the list membership.
> This is done to try to identify the member without actually including an
> email address in the display name as that is said to be a red flag to
> some ISPs.
>
> Mailman should really RFC 2047 encode the resultant display name or at
> least the non-ascii part of it, but it doesn't. I accept this as a
> Mailman bug and will work on fixing it.
>
> Anyway, Mailman sends the message with that non-ascii From: header and
> the outgoing MTA attempts to fix it and in the process makes it even worse.
Actually, further testing of this scenario shows that Mailman is likely
responsible for the mis-encoding as well. Once I realized the key was in
providing the poster's real name from the list's membership, I was able
to duplicate the issue including the mis-encoding.
So I don't need to see any further samples, and I have developed a fix.
The basic fix is very simple. In Mailman/Handlers/Cookheaders.py around
line 155 are the lines:
change_header('From',
formataddr(('%s via %s' % (realname, mlist.real_name),
mlist.GetListEmail())),
mlist, msg, msgdata)
Immediately before the change_header insert (indented the same 8 spaces)
realname = str(uheader(mlist, realname))
which will RFC 2047 encode the realname if it contains non-ascii.
This is now reported as
<https://bugs.launchpad.net/mailman/+bug/1536816> and the fix will be
committed soon.
--
Mark Sapiro <[email protected]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list [email protected]
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org