Mark Sapiro wrote: > Actually, further testing of this scenario shows that Mailman is likely > responsible for the mis-encoding as well.
To summarize and wrap up. It was possible for mailman to create a From: User_name via list_name <[email protected]> header with non-ascii in the User_name when creating the new From: for a message with Munge From or the From: for the outer mwrapper with Wrap Message. This would occur when the incoming From: had only an address and no display name so the poster's list membership real name would be used and that real name contained non-ascii. It could also occur if a post arrived containing an unencoded display name in From: if the sending MUA was non-compliant, but this scenario is unlikely. Thanks to gabriel for reporting the problem so it could ultimately be found and fixed. The underlying bug is that Mailman should RFC 2047 encode the User_name at that point, and now it does (bug at <https://bugs.launchpad.net/mailman/+bug/1536816>, fix at <http://bazaar.launchpad.net/~mailman-coders/mailman/2.1/revision/1597>[1]). This was further exacerbated by the fact that Mailman's SMTPDirect.py module uses the Mailman Message as_string() method to flatten the message object to plain text for sending, and sometimes, but not always, depending on characteristics of the message itself this method would refold or rewrite certain headers and in so doing would 'see' the non-ascii in the From: header and RFC 2047 encode the entire header content without regard for that fact that it contained address specs that are not to be encoded. Debugging this issue was complicated by the fact that the header encoding by as_string() didn't occur with every message and my initial test messages didn't trigger it. [1] The only part of the fix at <http://bazaar.launchpad.net/~mailman-coders/mailman/2.1/revision/1597> that is necessary to fix this issue is the addition of realname = str(uheader(mlist, realname)) The rest of it is for l10n of the "User_name via list_name" phrase. -- 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
