summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsapiro2006-05-14 03:29:12 +0000
committermsapiro2006-05-14 03:29:12 +0000
commitb03445179a611600cdb973f3c7b3cba89bb832b7 (patch)
tree440d71fce1d78b1214dccb2ed047c88975951112
parent590b6ebb628babc60fe282d133391dee155434ca (diff)
downloadmailman-b03445179a611600cdb973f3c7b3cba89bb832b7.tar.gz
mailman-b03445179a611600cdb973f3c7b3cba89bb832b7.tar.zst
mailman-b03445179a611600cdb973f3c7b3cba89bb832b7.zip
- Added additional bounce recognition for Qmail and SimpleMatch.py
- Added test cases for above.
-rw-r--r--Mailman/Bouncers/Qmail.py3
-rw-r--r--Mailman/Bouncers/SimpleMatch.py4
-rw-r--r--tests/bounces/qmail_04.txt81
-rw-r--r--tests/bounces/simple_17.txt76
-rw-r--r--tests/test_bounces.py2
5 files changed, 165 insertions, 1 deletions
diff --git a/Mailman/Bouncers/Qmail.py b/Mailman/Bouncers/Qmail.py
index def4abfa0..72a67db2b 100644
--- a/Mailman/Bouncers/Qmail.py
+++ b/Mailman/Bouncers/Qmail.py
@@ -33,7 +33,8 @@ import email.Iterators
introtags = [
'Hi. This is the',
"We're sorry. There's a problem",
- 'Check your send e-mail address.'
+ 'Check your send e-mail address.',
+ 'This is the mail delivery agent at'
]
acre = re.compile(r'<(?P<addr>[^>]*)>:')
diff --git a/Mailman/Bouncers/SimpleMatch.py b/Mailman/Bouncers/SimpleMatch.py
index 12eeffdca..d344f3289 100644
--- a/Mailman/Bouncers/SimpleMatch.py
+++ b/Mailman/Bouncers/SimpleMatch.py
@@ -87,6 +87,10 @@ PATTERNS = [
(_c('Unable to deliver message to the following address\(es\)\.'),
_c('--- Original message follows\.'),
_c('<(?P<addr>[^>]*)>:')),
+ # googlemail.com
+ (_c('Delivery to the following recipient failed'),
+ _c('----- Original message -----'),
+ _c('^\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
# kundenserver.de
(_c('A message that you sent could not be delivered'),
_c('^---'),
diff --git a/tests/bounces/qmail_04.txt b/tests/bounces/qmail_04.txt
new file mode 100644
index 000000000..dae2db011
--- /dev/null
+++ b/tests/bounces/qmail_04.txt
@@ -0,0 +1,81 @@
+Return-Path: <MAILER-DAEMON@sb7.songbird.com>
+Received: from mail47.messagelabs.com (mail47.messagelabs.com [216.82.240.163])
+ by sb7.songbird.com (8.12.11.20060308/8.12.11) with SMTP id
+ k488M87l021192
+ for <gpc-talk-bounces@grizz.org>; Mon, 8 May 2006 01:22:08 -0700
+Message-Id: <200605080822.k488M87l021192@sb7.songbird.com>
+X-VirusChecked: Checked
+X-StarScan-Version: 5.5.9.1; banners=.,-,-
+Received: (qmail 25062 invoked for bounce); 8 May 2006 08:21:20 -0000
+Date: 8 May 2006 08:21:19 -0000
+From: MAILER-DAEMON@messagelabs.com
+To: gpc-talk-bounces@grizz.org
+Subject: failure notice
+X-SongbirdInformation: support@songbird.com for more information
+X-Songbird: Clean
+X-Songbird-From:
+
+This is the mail delivery agent at messagelabs.com.
+I was not able to deliver your message to the following addresses.
+
+<merotiia@tennisnsw.com.au>:
+59.154.33.7 does not like recipient.
+Remote host said: 550 merotiia@tennisnsw.com.au... No such user
+
+
+--- Below this line is a copy of the message.
+
+Return-Path: <gpc-talk-bounces@grizz.org>
+X-VirusChecked: Checked
+X-Env-Sender: gpc-talk-bounces@grizz.org
+X-Msg-Ref: server-11.tower-47.messagelabs.com!1147076463!26398187!1
+X-StarScan-Version: 5.5.9.1; banners=-,-,-
+X-Originating-IP: [208.184.79.137]
+X-SpamReason: No, hits=0.1 required=7.0 tests=NO_REAL_NAME
+Received: (qmail 24873 invoked from network); 8 May 2006 08:21:04 -0000
+Received: from sb7.songbird.com (HELO sb7.songbird.com) (208.184.79.137)
+ by server-11.tower-47.messagelabs.com with AES256-SHA encrypted SMTP; 8 May 2006 08:21:04 -0000
+Received: from sb7.songbird.com (sb7.songbird.com [127.0.0.1])
+ by sb7.songbird.com (8.12.11.20060308/8.12.11) with ESMTP id k488LXaj021129
+ for <merotiia@tennisnsw.com.au>; Mon, 8 May 2006 01:21:33 -0700
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Subject: Your message to GPC-talk awaits moderator approval
+From: gpc-talk-bounces@grizz.org
+To: merotiia@tennisnsw.com.au
+Message-ID: <mailman.12143.1147076492.1568.gpc-talk@grizz.org>
+Date: Mon, 08 May 2006 01:21:32 -0700
+Precedence: bulk
+X-BeenThere: gpc-talk@grizz.org
+X-Mailman-Version: 2.1.5
+List-Id: Grizzly Peak Cyclists general discussion list <gpc-talk.grizz.org>
+X-List-Administrivia: yes
+Sender: gpc-talk-bounces@grizz.org
+Errors-To: gpc-talk-bounces@grizz.org
+X-SongbirdInformation: support@songbird.com for more information
+X-Songbird: Clean
+X-Songbird-From: gpc-talk-bounces@grizz.org
+
+Your mail to 'GPC-talk' with the subject
+
+ Re: the AzMBtEN
+
+Is being held until the list moderator can review it for approval.
+
+The reason it is being held:
+
+ Post by non-member to a members-only list
+
+Either the message will get posted to the list, or you will receive
+notification of the moderator's decision. If you would like to cancel
+this posting, please visit the following URL:
+
+ http://www.grizz.org/mailman/confirm/gpc-talk/83c05aa9c7a3037140e278e470d840926cd861cd
+
+
+______________________________________________________________________
+This email has been scanned by the MessageLabs Email Security System.
+For more information please visit http://www.messagelabs.com/email
+______________________________________________________________________
+
diff --git a/tests/bounces/simple_17.txt b/tests/bounces/simple_17.txt
new file mode 100644
index 000000000..10c8aac5a
--- /dev/null
+++ b/tests/bounces/simple_17.txt
@@ -0,0 +1,76 @@
+Return-Path: <MAILER-DAEMON@sb7.songbird.com>
+Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.199])
+ by sb7.songbird.com (8.12.11.20060308/8.12.11) with ESMTP id
+ k4A9vtBp031861
+ for <gpc-talk-bounces@grizz.org>; Wed, 10 May 2006 02:57:56 -0700
+Message-Id: <200605100957.k4A9vtBp031861@sb7.songbird.com>
+Received: by nz-out-0102.google.com with SMTP id m22so1664192nzf
+ for <gpc-talk-bounces@grizz.org>; Wed, 10 May 2006 02:57:22 -0700 (PDT)
+DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com;
+ h=received:from:to:subject:date;
+ b=itbNrMpynpFDGRA3H64TOv6bR4G2VheOanpQ+2ptQ6qXql7I3q+Wb42T5/7K2pRPUJyVyzJNaT2Lk9s2btWq7FOYeGTRvUapLbNQ/JJcrekaPkXT10YQCgYoxpo1UJVuE6zwj9cxpL2SFoKRdfaIjnEzdl3YTPoH7L8TPUSmsK0=
+Received: by 10.36.48.19 with SMTP id v19mr424437nzv;
+ Wed, 10 May 2006 02:57:22 -0700 (PDT)
+Received: by 10.36.48.19 with SMTP id v19mr539291nzv;
+ Wed, 10 May 2006 02:57:22 -0700 (PDT)
+From: Mail Delivery Subsystem <mailer-daemon@googlemail.com>
+To: gpc-talk-bounces@grizz.org
+Subject: Delivery Status Notification (Failure)
+Date: Wed, 10 May 2006 02:57:22 -0700 (PDT)
+X-SongbirdInformation: support@songbird.com for more information
+X-Songbird: Clean
+X-Songbird-From:
+
+This is an automatically generated Delivery Status Notification
+
+Delivery to the following recipient failed permanently:
+
+ internetsailing@gmail.com
+
+ ----- Original message -----
+
+Received: by 10.36.48.19 with SMTP id v19mr424427nzv;
+ Wed, 10 May 2006 02:57:21 -0700 (PDT)
+Return-Path: <gpc-talk-bounces@grizz.org>
+Received: from sara.dreamhost.com (sara.dreamhost.com [66.33.196.112])
+ by mx.gmail.com with ESMTP id r9si3586885nza.2006.05.10.02.57.21;
+ Wed, 10 May 2006 02:57:21 -0700 (PDT)
+Received-SPF: neutral (gmail.com: 66.33.196.112 is neither permitted nor denied by best guess record for domain of gpc-talk-bounces@grizz.org)
+Received: from sb7.songbird.com (sb7.songbird.com [208.184.79.137])
+ by sara.dreamhost.com (Postfix) with ESMTP id EC6134975D
+ for <decanofu@internetyachtclub.com>; Wed, 10 May 2006 02:57:20 -0700 (PDT)
+Received: from sb7.songbird.com (sb7.songbird.com [127.0.0.1])
+ by sb7.songbird.com (8.12.11.20060308/8.12.11) with ESMTP id k4A9vnNk031834
+ for <decanofu@internetyachtclub.com>; Wed, 10 May 2006 02:57:49 -0700
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Subject: Your message to GPC-talk awaits moderator approval
+From: gpc-talk-bounces@grizz.org
+To: decanofu@internetyachtclub.com
+Message-ID: <mailman.12400.1147255068.1568.gpc-talk@grizz.org>
+Date: Wed, 10 May 2006 02:57:48 -0700
+Precedence: bulk
+X-BeenThere: gpc-talk@grizz.org
+X-Mailman-Version: 2.1.5
+List-Id: Grizzly Peak Cyclists general discussion list <gpc-talk.grizz.org>
+X-List-Administrivia: yes
+Sender: gpc-talk-bounces@grizz.org
+Errors-To: gpc-talk-bounces@grizz.org
+X-SongbirdInformation: support@songbird.com for more information
+X-Songbird: Clean
+X-Songbird-From: gpc-talk-bounces@grizz.org
+
+Your mail to 'GPC-talk' with the subject
+
+ What IS 0EM Software And Why D0 You Care?
+
+Is being held until the list moderator can review it for approval.
+
+The reason it is being held:
+
+ Post by non-member to a members-only list
+
+
+ ----- Message truncated -----
+
diff --git a/tests/test_bounces.py b/tests/test_bounces.py
index 91d79403c..1cc386125 100644
--- a/tests/test_bounces.py
+++ b/tests/test_bounces.py
@@ -57,6 +57,7 @@ class BounceTest(unittest.TestCase):
'iqxwmmfauudpo@dachamp.com']),
('SimpleMatch', 'simple_15.txt', ['isam@kviv.be']),
('SimpleMatch', 'simple_16.txt', ['xvlogtfsei@the-messenger.com']),
+ ('SimpleMatch', 'simple_17.txt', ['internetsailing@gmail.com']),
('SimpleMatch', 'bounce_02.txt', ['acinsp1@midsouth.rr.com']),
('SimpleMatch', 'bounce_03.txt', ['james@jeborall.demon.co.uk']),
# SimpleWarning
@@ -102,6 +103,7 @@ class BounceTest(unittest.TestCase):
('Qmail', 'qmail_01.txt', ['psadisc@wwwmail.n-h.de']),
('Qmail', 'qmail_02.txt', ['rauschlo@frontfin.com']),
('Qmail', 'qmail_03.txt', ['crown@hbc.co.jp']),
+ ('Qmail', 'qmail_04.txt', ['merotiia@tennisnsw.com.au']),
# LLNL's custom Sendmail
('LLNL', 'llnl_01.txt', ['trotts1@llnl.gov']),
# Netscape's server...