On 9/22/21 9:02 AM, Markus Schaaf wrote:
Hi,
I have disabled all message modifications and filtering from within the webUI, and created empty header and footer template files. Still, some list messages get their body encoding changed to base64, breaking DKIM. What can I do to prevent this? (I'm a newbie to mailman3, so please give somewhat complete commands. I have read other threads with similar questions, but did not understand some shortened configuration commands.)
This is probably due to the message body charset being utf-8. The Python email library used by Mailman encodes utf-8 message bodies as base64. There are no configuration settings in Mailman to avoid this. Calling email.charset.add_charset('utf-8') at some point in Mailman's processing might avoid this. E.g. ``` --- a/src/mailman/handlers/validate_authenticity.py +++ b/src/mailman/handlers/validate_authenticity.py @@ -23,6 +23,7 @@ import logging from authheaders import authenticate_message from authres import AuthenticationResultsHeader, SyntaxError from dns.resolver import Timeout +from email.charset import add_charset from itertools import chain from mailman.config import config from mailman.core.i18n import _ @@ -121,5 +122,7 @@ class ValidateAuthenticity: def process(self, mlist, msg, msgdata): """See `IHandler`.""" + # Try to avoid base64 encoding of utf-8. + add_charset('utf-8') if config.arc_enabled: authenticate(msg, msgdata) ``` Note this is just a guess and could be a disaster so test it before trying it in production. -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan