From 37f1ef66a53379a3b77846c5390d7c902d41d857 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 8 Aug 2023 09:38:04 +0000 Subject: mailman: remove no-base64.diff I sent an email contaning an em dash to a mailing list, and it didn't get converted to base64, so I don't think this patch is required any more. --- overlays/patches/mailman/no-base64.diff | 34 --------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 overlays/patches/mailman/no-base64.diff (limited to 'overlays') diff --git a/overlays/patches/mailman/no-base64.diff b/overlays/patches/mailman/no-base64.diff deleted file mode 100644 index 2deef3ec3cf0..000000000000 --- a/overlays/patches/mailman/no-base64.diff +++ /dev/null @@ -1,34 +0,0 @@ -diff --git i/src/mailman/email/message.py w/src/mailman/email/message.py -index fd6a28144..693f8d2b7 100644 ---- i/src/mailman/email/message.py -+++ w/src/mailman/email/message.py -@@ -49,6 +49,11 @@ class Message(email.message.Message): - self.__dict__ = values - - def as_string(self): -+ try: -+ return email.message.Message.as_bytes(self).decode('utf-8') -+ except UnicodeEncodeError: -+ pass -+ - # Work around for https://bugs.python.org/issue27321 and - # https://bugs.python.org/issue32330. - try: -diff --git i/src/mailman/mta/connection.py w/src/mailman/mta/connection.py -index ebcc19eb4..e69fe4c6a 100644 ---- i/src/mailman/mta/connection.py -+++ w/src/mailman/mta/connection.py -@@ -127,10 +127,9 @@ class Connection: - if self._connection is None: - self._connect() - self._login() -- # smtplib.SMTP.sendmail requires the message string to be pure ascii. -- # We have seen malformed messages with non-ascii unicodes, so ensure -- # we have pure ascii. -- msgtext = msgtext.encode('ascii', 'replace').decode('ascii') -+ # smtplib.SMTP.sendmail requires the message string to be -+ # bytes or an ASCII string. -+ msgtext = msgtext.encode('utf-8') - try: - log.debug('envsender: %s, recipients: %s, size(msgtext): %s', - envsender, recipients, len(msgtext)) -- cgit 1.4.1