summaryrefslogtreecommitdiff
path: root/Mailman
diff options
context:
space:
mode:
authorbwarsaw2002-12-02 14:23:42 +0000
committerbwarsaw2002-12-02 14:23:42 +0000
commit07285e9299f82741d706c1d3c74ee75898fd2760 (patch)
treeb194ffd5d1a19cb961d879828e45c21dc8b2f34b /Mailman
parentcfdcf7bddc3454f0ee5f598356fb7c9dfa026a3a (diff)
downloadmailman-07285e9299f82741d706c1d3c74ee75898fd2760.tar.gz
mailman-07285e9299f82741d706c1d3c74ee75898fd2760.tar.zst
mailman-07285e9299f82741d706c1d3c74ee75898fd2760.zip
PATTERNS: Fix the regexp for sucking out the address in the section
labeled "sz-sb.de" to ignore potential angle-brackets that might appear. process(): Do a better job of filtering out Nones.
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Bouncers/SimpleMatch.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Mailman/Bouncers/SimpleMatch.py b/Mailman/Bouncers/SimpleMatch.py
index 80a25fc37..ccc8d6ed5 100644
--- a/Mailman/Bouncers/SimpleMatch.py
+++ b/Mailman/Bouncers/SimpleMatch.py
@@ -41,7 +41,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'<(?P<fulladdr>[^>]*)>|\(expanded from: <?(?P<addr>[^>)]*)>?\)')),
# robanal.demon.co.uk
(_c('this message was created automatically by mail delivery software'),
_c('original message follows'),
@@ -92,7 +92,9 @@ def process(msg, patterns=None):
if state == 1:
mo = acre.search(line)
if mo:
- addrs[mo.group('addr')] = 1
+ addr = mo.group('addr')
+ if addr:
+ addrs[mo.group('addr')] = 1
elif ecre.search(line):
break
return addrs.keys()