Defend against certain malformed messages.
Accommodate https://bugs.python.org/issue27321 by overriding as_string() in mailman.email.message.Message to catch the KeyError, get the message as_bytes() and convert it to a string. This obviates !197 as a fix for #256 so that is reverted. Also fix mailman.mta.connection.Connection.sendmail to ensure msgtext is pure ascii.
Loading