[Mailman-Developers] Proposal: option for UTF-8 emails without base64 encoding

Petr Hroudný petr.hroudny at gmail.com
Fri May 15 09:09:51 CEST 2009


2009/5/15 Barry Warsaw <barry at list.org>:
>> The fix is quite simple and is already widely used by other projects.
>> All that needs to be done is
>> to redefine Python's UTF-8 charset properties, i.e. in every place
>> where you have
>>
>> from email.Charset import Charset
>>
>> you need to add:
>>
>> email.Charset.add_charset('utf-8',email.Charset.SHORTEST, None, None)
>>
>> With such setting, mailman will keep the 8bit encoding also when it's
>> adding header/footer and won't downconvert to 7bit+base64. So I'd like
>> to propose the above addition, at least as a configurable option
>> if there's any fear that enabling it by default could cause some problems.
>
> I'll note that you don't need to change Mailman at all do to this.  You
> simply need to add this to your mm_cfg.py file and I'll bet it will just
> work for you.

It works indeed! Just a slightly different syntax needs to be used:

import email.Charset
email.Charset.add_charset('utf-8',email.Charset.SHORTEST, None, None)

It might probably make sense to document this somewhere, or perhaps introduce
a new config option for MM2.2 which will do this. Almost all MTAs today are 8bit
clean, so having an option to work in 8bit mode will surely be
attractive for many.

Thanks, Petr

P.S. I responded to your other comments into bug #373083 notes.


More information about the Mailman-Developers mailing list