aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mailman/Bouncers/SimpleMatch.py6
-rwxr-xr-xNEWS3
-rw-r--r--tests/bounces/qmail_08.txt24
-rw-r--r--tests/bounces/simple_39.txt32
-rwxr-xr-xtests/test_bounces.py5
5 files changed, 68 insertions, 2 deletions
diff --git a/Mailman/Bouncers/SimpleMatch.py b/Mailman/Bouncers/SimpleMatch.py
index 0607ce86..2aa082a2 100644
--- a/Mailman/Bouncers/SimpleMatch.py
+++ b/Mailman/Bouncers/SimpleMatch.py
@@ -42,7 +42,7 @@ PATTERNS = [
# sz-sb.de, corridor.com, nfg.nl
(_c('the following addresses had'),
_c('transcript of session follows'),
- _c(r'<(?P<fulladdr>[^>]*)>|\(expanded from: <?(?P<addr>[^>)]*)>?\)')),
+ _c(r'^ *(\(expanded from: )?<?(?P<addr>[^\s@]+@[^\s@>]+?)>?\)?\s*$')),
# robanal.demon.co.uk
(_c('this message was created automatically by mail delivery software'),
_c('original message follows'),
@@ -184,6 +184,10 @@ PATTERNS = [
_c(
'Your message to (?P<addr>[^\s@]+@[^\s@]+) was automatically rejected'
)),
+ # mail.ru
+ (_c('A message that you sent was rejected'),
+ _c('This is a copy of your message'),
+ _c('\s(?P<addr>[^\s@]+@[^\s@]+)')),
# Next one goes here...
]
diff --git a/NEWS b/NEWS
index 13a15f67..a58cbee6 100755
--- a/NEWS
+++ b/NEWS
@@ -61,6 +61,9 @@ Here is a history of user visible changes to Mailman.
Bug Fixes and other patches
+ - Backported recognition for mail.ru DSNs and minor bug fixes from
+ lp:flufl.bounce. (LP: #1074592, LP: #1079249 and #1079254)
+
- Defended against buggy web servers that don't include an empty
QUERY_STRING in the CGI environment. (LP: 1160647)
diff --git a/tests/bounces/qmail_08.txt b/tests/bounces/qmail_08.txt
new file mode 100644
index 00000000..583d94aa
--- /dev/null
+++ b/tests/bounces/qmail_08.txt
@@ -0,0 +1,24 @@
+From contact@example.com Mon Mar 18 11:39:41 2013
+Return-Path: <contact@example.com>
+X-Original-To: noreply@example.org
+Delivered-To: noreply@example.org
+Received: from example.com (example.com [1.2.3.4])
+ by worker1.example.org (Postfix) with ESMTP id 58C7E14C1208
+ for <noreply@example.org>; Mon, 18 Mar 2013 11:39:40 +0000 (GMT)
+Received: from contact by example.com with local (Exim 4.80)
+ (envelope-from <contact@example.com>)
+ id 1UHYPj-0001DB-Ij
+ for noreply@example.org; Mon, 18 Mar 2013 06:39:39 -0500
+To: "Example Sender" <noreply@example.org>
+MIME-Version: 1.0
+Precedence: auto_reply
+X-Precedence: auto_reply
+From: "Example user" <contact@example.com>
+Content-type: text/plain; charset=ansi_x3.110-1983
+Subject: Auto reply
+Message-Id: <E1UHYPj-0001DB-Ij@example.com>
+Date: Mon, 18 Mar 2013 06:39:39 -0500
+X-Comment: qmail detector would throw UnicodeDecodeError on this message
+X-Comment: when running under Python 2.x. Bug LP: 1074592.
+
+Gracias por contactar con nosotros!! en este instante estamos procesando la respuesta a tu consulta, a la mayor brevedad posible tendr疽 noticias nuestras...
diff --git a/tests/bounces/simple_39.txt b/tests/bounces/simple_39.txt
new file mode 100644
index 00000000..1b46ff92
--- /dev/null
+++ b/tests/bounces/simple_39.txt
@@ -0,0 +1,32 @@
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Auto-Submitted: auto-replied
+Date: Wed, 07 Nov 2012 10:47:34 +0400
+From: Mail Delivery System <Mailer-Daemon@mx183.mail.ru>
+Message-Id: <E1TVzQE-0003uW-ED@mx183.mail.ru>
+Subject: =?utf-8?b?0JLQsNGI0LUg0YHQvtC+0LHRidC10L3QuNC1INC90LUg0LTQvtGB0YLQsNCy0LvQ?=
+ =?utf-8?b?tdC90L4uIE1haWwgZmFpbHVyZS4=?=
+To: noreply@example.com
+Content-Transfer-Encoding: 8bit
+
+ミュムひセ ミソミクムム糊シミセ ムミセミキミエミーミスミセ ミーミイムひセミシミームひクムミオムミコミク ムミオムミイミオムミセミシ Mail.Ru, ミセムひイミオムミームび ミスミー ミスミオミウミセ ミスミオ ミスムσカミスミセ.
+
+ミ ムミセミカミーミサミオミスミクム, ミ漬ーム威オ ミソミクムム糊シミセ ミスミオ ミシミセミカミオム ミアム錦び ミエミセムムひーミイミサミオミスミセ ミセミエミスミセミシム ミクミサミク ミスミオムミコミセミサム糊コミクミシ ミソミセミサムτミームひオミサム紹シ, ミソミセムひセミシム ムムひセ:
+
+ Message was not accepted -- invalid mailbox.
+ Local mailbox foo@mail.ru is unavailable: user not found
+
+**********************
+
+A message that you sent was rejected by the local scanning code that
+checks incoming messages on this system. The following error was given:
+
+ Message was not accepted -- invalid mailbox.
+ Local mailbox foo@mail.ru is unavailable: user not found
+
+------ This is a copy of your message, including all the headers.
+------ No more than 1K characters of the body are included.
+
+Received: from mail by mx183.mail.ru with local (envelope-from <noreply@example.com>)
+ id 1TVzQE-0003tT-Co
+ for foo@mail.ru; Wed, 07 Nov 2012 10:47:34 +0400
diff --git a/tests/test_bounces.py b/tests/test_bounces.py
index bb20578c..731f3bbe 100755
--- a/tests/test_bounces.py
+++ b/tests/test_bounces.py
@@ -41,7 +41,8 @@ class BounceTest(unittest.TestCase):
# Exim bounces
('Exim', 'exim_01.txt', ['delangen@its.tudelft.nl']),
# SimpleMatch bounces
- ('SimpleMatch', 'sendmail_01.txt', ['zzzzz@nfg.nl']),
+ ('SimpleMatch', 'sendmail_01.txt', ['zzzzz@shaft.coal.nl',
+ 'zzzzz@nfg.nl']),
('SimpleMatch', 'simple_01.txt', ['bbbsss@turbosport.com']),
('SimpleMatch', 'simple_02.txt', ['chris.ggggmmmm@usa.net']),
('SimpleMatch', 'simple_04.txt', ['claird@starbase.neosoft.com']),
@@ -79,6 +80,7 @@ class BounceTest(unittest.TestCase):
('SimpleMatch', 'simple_36.txt', ['garyt@xxx.com']),
('SimpleMatch', 'simple_37.txt', ['user@uci.edu']),
('SimpleMatch', 'simple_38.txt', ['prueba@domain.com']),
+ ('SimpleMatch', 'simple_39.txt', [b'foo@mail.ru']),
('SimpleMatch', 'bounce_02.txt', ['acinsp1@midsouth.rr.com']),
('SimpleMatch', 'bounce_03.txt', ['james@jeborall.demon.co.uk']),
# SimpleWarning
@@ -136,6 +138,7 @@ class BounceTest(unittest.TestCase):
('Qmail', 'qmail_05.txt', ['ivokggrrdvc@caixaforte.freeservers.com']),
('Qmail', 'qmail_06.txt', ['ntl@xxx.com']),
('Qmail', 'qmail_07.txt', ['user@example.net']),
+ ('Qmail', 'qmail_08.txt', []),
# LLNL's custom Sendmail
('LLNL', 'llnl_01.txt', ['trotts1@llnl.gov']),
# Netscape's server...