From 20e82fb48403adac142f2a65064e63ef99f21568 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Wed, 22 Dec 2010 08:07:37 -0800 Subject: Added bounce recognition for a bogus Dovecot MDN. Bug #693134. --- Mailman/Bouncers/SimpleMatch.py | 8 ++++- NEWS | 2 ++ tests/bounces/simple_38.txt | 70 +++++++++++++++++++++++++++++++++++++++++ tests/test_bounces.py | 1 + 4 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 tests/bounces/simple_38.txt diff --git a/Mailman/Bouncers/SimpleMatch.py b/Mailman/Bouncers/SimpleMatch.py index 1c88d5ac..0607ce86 100644 --- a/Mailman/Bouncers/SimpleMatch.py +++ b/Mailman/Bouncers/SimpleMatch.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2009 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2010 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 @@ -178,6 +178,12 @@ PATTERNS = [ (_c('--------Message not delivered'), _c('--------Error Detail'), _c('^\s*(?P[^\s@]+@[^\s@]+)\s*$')), + # Dovecot LDA Over quota MDN (bogus - should be DSN). + (_c('^Your message'), + _c('^Reporting'), + _c( + 'Your message to (?P[^\s@]+@[^\s@]+) was automatically rejected' + )), # Next one goes here... ] diff --git a/NEWS b/NEWS index acacd31a..13a3ee8d 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ Here is a history of user visible changes to Mailman. Bug Fixes and other patches + - Added bounce recognition for a bogus Dovecot MDN. Bug #693134. + - Fixed a problem where an emailed command in the Subject: header with a non-ascii l10n of an 'Re:' prefix is ignored. Bug #685261. diff --git a/tests/bounces/simple_38.txt b/tests/bounces/simple_38.txt new file mode 100644 index 00000000..224a55e2 --- /dev/null +++ b/tests/bounces/simple_38.txt @@ -0,0 +1,70 @@ +Return-Path: +Delivered-To: user@domain.com +Received: from localhost (localhost [127.0.0.1]) + by mail.domain.com (Postfix) with ESMTP id 7043958636E + for ; Tue, 21 Dec 2010 14:05:59 -0600 (CST) +X-Virus-Scanned: Debian amavisd-new at domain.com +Received: from mail.domain.com ([127.0.0.1]) + by localhost (mail.domain.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id GV6LC3VuoLKG for ; + Tue, 21 Dec 2010 14:05:58 -0600 (CST) +Received: by mail.domain.com (Postfix, from userid 5000) + id BD8D358639E; Tue, 21 Dec 2010 14:05:58 -0600 (CST) +Message-ID: +Date: Tue, 21 Dec 2010 14:05:58 -0600 +From: Mail Delivery Subsystem +To: +MIME-Version: 1.0 +Content-Type: multipart/report; report-type=disposition-notification; + boundary="15778/mail" +Subject: Automatically rejected mail +Auto-Submitted: auto-replied (rejected) +Precedence: bulk + +This is a MIME-encapsulated message + +--15778/mail +Content-Type: text/plain; charset=utf-8 +Content-Disposition: inline +Content-Transfer-Encoding: 8bit + +Your message to was automatically rejected: +Quota exceeded +--15778/mail +Content-Type: message/disposition-notification + +Reporting-UA: mail; Dovecot Mail Delivery Agent +Final-Recipient: rfc822; prueba@domain.com +Original-Message-ID: <2ee7df1322121930966bcc2318379726@localhost> +Disposition: automatic-action/MDN-sent-automatically; deleted + +--15778/mail +Content-Type: message/rfc822 + +Return-Path: +Delivered-To: prueba@domain.com +Received: from localhost (localhost [127.0.0.1]) + by mail.domain.com (Postfix) with ESMTP id 2DC8B586389; + Tue, 21 Dec 2010 14:05:58 -0600 (CST) +X-Virus-Scanned: Debian amavisd-new at domain.com +Received: from mail.domain.com ([127.0.0.1]) + by localhost (mail.domain.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id XCn4+RhZPLzi; Tue, 21 Dec 2010 14:05:57 -0600 (CST) +Received: from mail.domain.com (localhost [127.0.0.1]) + (Authenticated sender: user@domain.com) + by mail.domain.com (Postfix) with ESMTPA id 25E7E58636E; + Tue, 21 Dec 2010 14:05:57 -0600 (CST) +Received: from static5.domain.com ([5.5.5.5]) + by mail.domain.com + with HTTP (HTTP/1.1 POST); Tue, 21 Dec 2010 14:05:57 -0600 +MIME-Version: 1.0 +Date: Tue, 21 Dec 2010 14:05:57 -0600 +From: +To: +Subject: Testing +Message-ID: <2ee7df1322121930966bcc2318379726@localhost> +X-Sender: user@domain.com + + + +--15778/mail-- diff --git a/tests/test_bounces.py b/tests/test_bounces.py index e3b07da0..d370ab31 100644 --- a/tests/test_bounces.py +++ b/tests/test_bounces.py @@ -78,6 +78,7 @@ class BounceTest(unittest.TestCase): ('SimpleMatch', 'simple_34.txt', ['roland@xxx.com']), ('SimpleMatch', 'simple_36.txt', ['garyt@xxx.com']), ('SimpleMatch', 'simple_37.txt', ['user@uci.edu']), + ('SimpleMatch', 'simple_38.txt', ['prueba@domain.com']), ('SimpleMatch', 'bounce_02.txt', ['acinsp1@midsouth.rr.com']), ('SimpleMatch', 'bounce_03.txt', ['james@jeborall.demon.co.uk']), # SimpleWarning -- cgit v1.2.3