From 415f28f12f21b8e4ba0c86596c0d2d6dceb17ef0 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 20 Dec 2013 15:45:28 -0800 Subject: Added recognition for a kundenserver.de warning to simplewarning.py --- tests/bounces/simple_40.txt | 29 +++++++++++++++++++++++++++++ tests/onebounce.py | 6 ++++-- tests/test_bounces.py | 3 ++- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 tests/bounces/simple_40.txt (limited to 'tests') 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 +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: + + + +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 -- cgit v1.2.3