summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mailman/Bouncers/SMTP32.py9
-rw-r--r--Mailman/Bouncers/SimpleMatch.py7
-rw-r--r--Mailman/tests/test_bounces.py1
3 files changed, 11 insertions, 6 deletions
diff --git a/Mailman/Bouncers/SMTP32.py b/Mailman/Bouncers/SMTP32.py
index c3d4ddccf..f2397b247 100644
--- a/Mailman/Bouncers/SMTP32.py
+++ b/Mailman/Bouncers/SMTP32.py
@@ -4,14 +4,14 @@
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
+# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
@@ -38,9 +38,10 @@ acre = re.compile(r'''
|delivery\ failed[^:]*: # wild...
|unknown\ user[^:]*:
|undeliverable\ +to
+ |delivery\ userid[^:]*:
)
\s* # space separator
- (?P<addr>.*) # and finally, the address
+ (?P<addr>[^\s]*) # and finally, the address
''', re.IGNORECASE | re.VERBOSE)
diff --git a/Mailman/Bouncers/SimpleMatch.py b/Mailman/Bouncers/SimpleMatch.py
index cc0dd3225..2e9c23b13 100644
--- a/Mailman/Bouncers/SimpleMatch.py
+++ b/Mailman/Bouncers/SimpleMatch.py
@@ -101,7 +101,10 @@ PATTERNS = [
_c('^(?P<addr>[^\s@]+@[^\s@:]+):')),
# thehartford.com
(_c('Delivery to the following recipients failed'),
- _c("Bogus - there actually isn't anything"),
+ # this one may or may not have the original message, but there's nothing
+ # unique to stop on, so stop on the first line of at least 3 characters
+ # that doesn't start with 'D' (to not stop immediately) and has no '@'.
+ _c('^[^D][^@]{2,}$'),
_c('^\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
# and another thehartfod.com/hartfordlife.com
(_c('^Your message\s*$'),
@@ -160,7 +163,7 @@ PATTERNS = [
_c('^-'),
_c('\s(?P<addr>[^\s@]+@[^\s@]+)[\s,]')),
# pla.net.py (MDaemon.PRO ?)
- (_c('no such user here'),
+ (_c('- no such user here'),
_c('There is no user'),
_c('^(?P<addr>[^\s@]+@[^\s@]+)\s')),
# Next one goes here...
diff --git a/Mailman/tests/test_bounces.py b/Mailman/tests/test_bounces.py
index ebc7c6c4d..1c3ee0326 100644
--- a/Mailman/tests/test_bounces.py
+++ b/Mailman/tests/test_bounces.py
@@ -115,6 +115,7 @@ class BounceTest(unittest.TestCase):
'one_bad_address@pacbell.net']),
('SMTP32', 'smtp32_05.txt', ['jmrpowersports@jmrpowersports.com']),
('SMTP32', 'smtp32_06.txt', ['Absolute_garbage_addr@pacbell.net']),
+ ('SMTP32', 'smtp32_07.txt', ['info@husbyran.com']),
# Qmail
('Qmail', 'qmail_01.txt', ['psadisc@wwwmail.n-h.de']),
('Qmail', 'qmail_02.txt', ['rauschlo@frontfin.com']),