On 11/13/2013 11:52 PM, Roel Wagenaar wrote:
> 
> My /etc/procmailrc is decoding Content-Transfer-Encoding: base64 headers as
> standard rule forall incoming mail.
> 
> Funny thing happens when filtered mailis beiing resend by Maiman, it encode
> the base64 part again, is there an option to prevent this? I don't seem to
> beable to find it.


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')

-- 
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

Reply via email to