aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2013-12-20 15:45:28 -0800
committerMark Sapiro <mark@msapiro.net>2013-12-20 15:45:28 -0800
commit415f28f12f21b8e4ba0c86596c0d2d6dceb17ef0 (patch)
tree3a1f88564adc1c80b61e7bef5e7913d0e46b5e07
parent729b5a01726ff13c68bb794e079d424771682538 (diff)
downloadmailman2-415f28f12f21b8e4ba0c86596c0d2d6dceb17ef0.tar.gz
mailman2-415f28f12f21b8e4ba0c86596c0d2d6dceb17ef0.tar.xz
mailman2-415f28f12f21b8e4ba0c86596c0d2d6dceb17ef0.zip
Added recognition for a kundenserver.de warning to simplewarning.py
Diffstat (limited to '')
-rw-r--r--Mailman/Bouncers/SimpleWarning.py6
-rwxr-xr-xNEWS3
-rw-r--r--tests/bounces/simple_40.txt29
-rwxr-xr-xtests/onebounce.py6
-rwxr-xr-xtests/test_bounces.py3
5 files changed, 43 insertions, 4 deletions
diff --git a/Mailman/Bouncers/SimpleWarning.py b/Mailman/Bouncers/SimpleWarning.py
index ab8d6aa2..4f5958ea 100644
--- a/Mailman/Bouncers/SimpleWarning.py
+++ b/Mailman/Bouncers/SimpleWarning.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2009 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -57,6 +57,10 @@ patterns = [
(_c('We will continue to try to deliver'),
_c('.+'),
_c('(?P<addr>.+)')),
+ # kundenserver.de
+ (_c('not yet been delivered'),
+ _c('No action is required on your part'),
+ _c(r'\s*<?(?P<addr>\S+@[^>\s]+)>?\s*')),
# Next one goes here...
]
diff --git a/NEWS b/NEWS
index 246606ef..8fff79f6 100755
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@ Here is a history of user visible changes to Mailman.
Bug Fixes and other patches
+ - Added recognition for another simple warning to bounce processing.
+ (LP: #1263247)
+
- Fixed a few failing tests in tests/test_handlers.py. (LP: #1262950)
- Fixed bin/arch to not create scrubbed attachments for messages skipped
diff --git a/tests/bounces/simple_40.txt b/tests/bounces/simple_40.txt
new file mode 100644
index 00000000..89375151
--- /dev/null
+++ b/tests/bounces/simple_40.txt
@@ -0,0 +1,29 @@
+Return-Path: <>
+Received: from mout by moeu2.kundenserver.de id 0LkyaB-1VJZRH2iiz-00ahag;
+ Fri, 13 Dec 2013 01:07:54 +0100
+Date: Fri, 13 Dec 2013 01:07:54 +0100
+From: Mail Delivery System <mailer-daemon@kundenserver.de>
+To: mailman-users-bounces+user=example.com@python.org
+Subject: Warning: message delayed 2 days
+Message-Id: <0LkyaB-1VJZRH2iiz-00ahag@moeu2.kundenserver.de>
+X-Original-Id: 0LykMh-1VSY0J0JZn-015ri8
+
+This message was created automatically by mail delivery software.
+
+A message that you sent has not yet been delivered to one or more of
+its recipients after 2 days.
+
+The message has not yet been delivered to the following addresses:
+
+ <user@example.com>
+
+host lsvk.de[213.165.78.137]:
+connection to mail exchanger failed
+
+No action is required on your part. Delivery attempts will continue for
+some time, and this warning may be repeated at intervals if the message
+remains undelivered. Eventually the mail delivery software will give up,
+and when that happens, the message will be returned to you.
+
+--- The header of the original message is following. ---
+
diff --git a/tests/onebounce.py b/tests/onebounce.py
index 2b05807c..846c4fa6 100755
--- a/tests/onebounce.py
+++ b/tests/onebounce.py
@@ -1,6 +1,6 @@
#! /usr/bin/env python
-# Copyright (C) 2002 by the Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -14,7 +14,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
"""Test the bounce detection for files containing bounces.
@@ -80,6 +81,7 @@ def main():
print module, 'got a Stop'
if not all:
break
+ continue
if not addrs:
if verbose:
print module, 'found no matches'
diff --git a/tests/test_bounces.py b/tests/test_bounces.py
index 731f3bbe..8c33ccfd 100755
--- a/tests/test_bounces.py
+++ b/tests/test_bounces.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2011 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -89,6 +89,7 @@ class BounceTest(unittest.TestCase):
('SimpleWarning', 'simple_22.txt', Stop),
('SimpleWarning', 'simple_28.txt', Stop),
('SimpleWarning', 'simple_35.txt', Stop),
+ ('SimpleWarning', 'simple_40.txt', Stop),
# GroupWise
('GroupWise', 'groupwise_01.txt', ['thoff@MAINEX1.ASU.EDU']),
# This one really sucks 'cause it's text/html. Just make sure it