diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/runners/lmtp.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mailman/runners/lmtp.py b/src/mailman/runners/lmtp.py index 8a490d906..bd577803e 100644 --- a/src/mailman/runners/lmtp.py +++ b/src/mailman/runners/lmtp.py @@ -139,7 +139,7 @@ class Channel(smtpd.SMTPChannel): """An LMTP channel.""" def __init__(self, server, conn, addr): - super().__init__(server, conn, addr) + super().__init__(server, conn, addr, decode_data=False) # Stash this here since the subclass uses private attributes. :( self._server = server @@ -179,14 +179,14 @@ class LMTPRunner(Runner, smtpd.SMTPServer): slog.debug('LMTP accept from %s', addr) @transactional - def process_message(self, peer, mailfrom, rcpttos, data): + def process_message(self, peer, mailfrom, rcpttos, data, **kwargs): try: # Refresh the list of list names every time we process a message # since the set of mailing lists could have changed. listnames = set(getUtility(IListManager).names) # Parse the message data. If there are any defects in the # message, reject it right away; it's probably spam. - msg = email.message_from_string(data, Message) + msg = email.message_from_bytes(data, Message) except Exception: elog.exception('LMTP message parsing') config.db.abort() |
