diff options
author | msapiro <> | 2006-03-06 18:12:36 +0000 |
---|---|---|
committer | msapiro <> | 2006-03-06 18:12:36 +0000 |
commit | 01568fe1041a0002160a962526c1203bf65d2fc3 (patch) | |
tree | 923c13c68695dfc3bba2b5e72f8b9e4ca79921f0 /Mailman/Bouncers | |
parent | 8150914806968df6a3cfd04dc74eed1882feac8b (diff) | |
download | mailman2-01568fe1041a0002160a962526c1203bf65d2fc3.tar.gz mailman2-01568fe1041a0002160a962526c1203bf65d2fc3.tar.xz mailman2-01568fe1041a0002160a962526c1203bf65d2fc3.zip |
Updated SimpleWarning to return Stop. Updated SimpleMatch to catch a few more
Added some more test cases.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Bouncers/SimpleMatch.py | 8 | ||||
-rw-r--r-- | Mailman/Bouncers/SimpleWarning.py | 12 |
2 files changed, 17 insertions, 3 deletions
diff --git a/Mailman/Bouncers/SimpleMatch.py b/Mailman/Bouncers/SimpleMatch.py index a530f36f..c3749b4a 100644 --- a/Mailman/Bouncers/SimpleMatch.py +++ b/Mailman/Bouncers/SimpleMatch.py @@ -95,6 +95,14 @@ PATTERNS = [ (_c('A message that you sent could not be delivered'), _c('^--- The header of the original'), _c('^(?P<addr>[^\s@]+@[^\s@:]+):')), + # thehartford.com + (_c('Delivery to the following recipients failed'), + _c("Bogus - there actually isn't anything"), + _c('^\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')), + # and another thehartfod.com/hartfordlife.com + (_c('^Your message'), + _c('^because:'), + _c('^\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')), # Next one goes here... ] diff --git a/Mailman/Bouncers/SimpleWarning.py b/Mailman/Bouncers/SimpleWarning.py index eefd46a5..733994eb 100644 --- a/Mailman/Bouncers/SimpleWarning.py +++ b/Mailman/Bouncers/SimpleWarning.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001,2002 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2006 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 @@ -12,10 +12,12 @@ # # 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. """Recognizes simple heuristically delimited warnings.""" +from Mailman.Bouncers.BouncerAPI import Stop from Mailman.Bouncers.SimpleMatch import _c from Mailman.Bouncers.SimpleMatch import process as _process @@ -41,4 +43,8 @@ patterns = [ def process(msg): - return _process(msg, patterns) + if _process(msg, patterns): + # It's a recognized warning so stop now + return Stop + else: + return [] |