[Mailman-Users] Content-Transfer-Encoding: not workng as expected.

Roel Wagenaar roel at wagenaar.nu
Fri Nov 15 15:11:03 CET 2013


Mark Sapiro <mark at msapiro.net> wrote:

> I am guessing that you are talking about plain text message bodies with
> character set UTF-8, and your list is adding a msg_header or msg_footer,
> although there could be other cases as well.
> 
> This issue is due to the Python email package. In order to add a
> msg_header or msg_footer to the message body, mailman has to do
> set_payload() on the email.message.Message instance. This in turn does
> set_charset() which encodes the body with the encoding of the
> body_encoding attribute of the email.charset.Charset instance for that
> character set. For UTF-8, this is base64.
> 
> If my guess is correct, you may be able to avoid the re-encoding by making
> sure the list's msg_header and msg_footer are empty.
> 
> Otherwise, you could look at Mailman/Handlers/Decorate.py and try adding
> the following near the beginning after "import re"
> 
> import email.charset email.charset.CHARSETS['utf-8'] = (SHORTEST,  None,
> 'utf-8')

Yes, I have msg_footer active, and don't want it empty.

I have adde your lines right after "import re", and almost instantly get the
"We hit a bug" message in the web interface.

I have attached an extract from mailmans error log, hope the list will allow
it.
The error message is:

admin(3051):     from Mailman.Handlers.Decorate import decorate
admin(3051):   File "/var/lib/mailman/Mailman/Handlers/Decorate.py", line
23, in <module>
admin(3051):     email.charset.CHARSETS['utf-8'] = (SHORTEST,  None,
'utf-8')
admin(3051): NameError: name 'SHORTEST' is not defined

I have disabled the lines again.

-- 
Roel Wagenaar,

Linux-User #469851 with the Linux Counter; http://linuxcounter.net/

Antw.: Omdat het de volgorde verstoord waarin mensen tekst lezen.
Vraag: Waarom is top-posting een slechte gewoonte?
Antw.: Top-posting.
Vraag: Wat is het meest ergerlijke in e-mail?

Good judgement comes from experience. Unfortunately, experience comes from
bad judgement.



More information about the Mailman-Users mailing list