aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mailman/Bouncers/SimpleMatch.py4
-rw-r--r--NEWS4
-rw-r--r--tests/bounces/yahoo_12.txt18
-rw-r--r--tests/test_bounces.py1
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...
]
diff --git a/NEWS b/NEWS
index 39197c54..41f897ad 100644
--- a/NEWS
+++ b/NEWS
@@ -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),