[Mailman-Users] Mailman brokenly base64-encoding all messages

Mark Sapiro mark at msapiro.net
Thu Mar 30 11:35:54 EDT 2017


On 03/30/2017 02:02 AM, Jon Ribbens wrote:
> I'm using Mailman 2.1.22 packaged by Ubuntu 16.10.
> 
> It appears that on one (but I think not all) of my mailing lists,
> Mailman is base64-encoding every single message. Yes, including
> ones that 100% definitely contain only ASCII characters. Does anyone
> know why Mailman would be doing this?


Yes. First, Debian has changed their Mailman package on which Ubuntu is
based to make UTF-8 Mailman's character set for all preferred languages.

This combines with the fact that the Python email library base64 encodes
utf-8 message bodies.


> You might say that base64-encoding all messages shouldn't be
> a problem, and you'd be partly right. However there is also another
> problem: Mailman is getting the line break encoding wrong in its
> base64-encoded messages - by which I mean the encoded representation
> of line breaks inside the base64 data. As per RFC 2045 s6.8: "line
> breaks must be converted into CRLF sequences prior to base64 encoding"
> but Mailman is outputting just LF.


I believe that RFC 2045 s6.8 refers back to canonical form as discussed
in sections 6.5 and 6.6 and RFC 2049 sec 4. While it is arguable that
this requires all plain text to use CRLF line delimiters regardless of
encoding, I think common practice is to use CRLF only "on the wire" and
not in base64 or quoted-printable encodings.


> The latter problem definitely appears to be a bug in Mailman,
> or perhaps the Python 'email' package.


If it is a bug, it is in the Python email library, not Mailman.


> The former seems likely to
> be a configuration issue, but it's not obvious to me where.


To change the former, you can put

add_language('en', 'English (USA)', 'us-ascii')

in mm_cfg.py.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan


More information about the Mailman-Users mailing list