diff options
author | Mark Sapiro <mark@msapiro.net> | 2020-04-25 20:14:40 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2020-04-25 20:14:40 -0700 |
commit | 8ec4dad9822f390a3e4a1fe7451ccc97f5a3d6de (patch) | |
tree | fdd7c839f320085137f13262fa5a0fbfd4d30c84 | |
parent | d7ca020be472fd3cb589d3b04d85d2a5b2d05ff6 (diff) | |
download | mailman2-8ec4dad9822f390a3e4a1fe7451ccc97f5a3d6de.tar.gz mailman2-8ec4dad9822f390a3e4a1fe7451ccc97f5a3d6de.tar.xz mailman2-8ec4dad9822f390a3e4a1fe7451ccc97f5a3d6de.zip |
Updates to bounce recognition.
-rw-r--r-- | Mailman/Bouncers/SimpleMatch.py | 4 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | tests/bounces/yahoo_12.txt | 18 | ||||
-rw-r--r-- | tests/test_bounces.py | 1 |
4 files changed, 27 insertions, 0 deletions
diff --git a/Mailman/Bouncers/SimpleMatch.py b/Mailman/Bouncers/SimpleMatch.py index 1c573e02..6de9a858 100644 --- a/Mailman/Bouncers/SimpleMatch.py +++ b/Mailman/Bouncers/SimpleMatch.py @@ -195,6 +195,10 @@ PATTERNS = [ (_c('Message could not be delivered to some recipients.'), _c('Message headers follow'), _c('Recipient: \[SMTP:(?P<addr>[^\s@]+@[^\s@]+)\]')), + # This one is from Yahoo but dosen't fit the yahoo recognizer format + (_c(r'wasn\'t able to deliver the following message'), + _c(r'---Below this line is a copy of the message.'), + _c(r'To: (?P<addr>[^\s@]+@[^\s@]+)')), # Next one goes here... ] @@ -11,6 +11,10 @@ Here is a history of user visible changes to Mailman. - The Spanish translation has been updated by Omar Walid Llorente. + Bug Fixes and other patches + + - Bounce recognition for a non-compliant Yahoo format is added. + 2.1.30 (13-Apr-2020) New Features diff --git a/tests/bounces/yahoo_12.txt b/tests/bounces/yahoo_12.txt new file mode 100644 index 00000000..8b266c04 --- /dev/null +++ b/tests/bounces/yahoo_12.txt @@ -0,0 +1,18 @@ +From: MAILER-DAEMON@yahoo.com +To: list-bounces@lists.example.org +Message-ID: <1724157855.37526491587724620658.JavaMail.yahoo@mpq204.consmr.mail.bf2.yahoo.com> +MIME-Version: 1.0 +Content-Type: text/html; charset="utf-8" +Content-Transfer-Encoding: 7bit +Message-ID-Hash: NMFBS7K2KRA44XW6KCW6CW6NNKCXESHM +X-Message-ID-Hash: NMFBS7K2KRA44XW6KCW6CW6NNKCXESHM +X-MailFrom: MAILER-DAEMON@yahoo.com + +I'm afraid I wasn't able to deliver the following message. +This is a permanent error; I've given up. Sorry it didn't work out. + +Subject: [List] Re: Name for MP3 Folder +To: user@yahoo.com + +---Below this line is a copy of the message. + diff --git a/tests/test_bounces.py b/tests/test_bounces.py index 2f814428..3ddde6b6 100644 --- a/tests/test_bounces.py +++ b/tests/test_bounces.py @@ -84,6 +84,7 @@ class BounceTest(unittest.TestCase): ('SimpleMatch', 'simple_41.txt', ['userx@example.com']), ('SimpleMatch', 'bounce_02.txt', ['userx@example.com']), ('SimpleMatch', 'bounce_03.txt', ['userx@example.uk']), + ('SimpleMatch', 'yahoo_12.txt', ['user@yahoo.com']), # SimpleWarning ('SimpleWarning', 'simple_03.txt', Stop), ('SimpleWarning', 'simple_21.txt', Stop), |