diff options
Diffstat (limited to 'Mailman/Bouncers/Postfix.py')
| -rw-r--r-- | Mailman/Bouncers/Postfix.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Mailman/Bouncers/Postfix.py b/Mailman/Bouncers/Postfix.py index 68f68e6c1..d76a59323 100644 --- a/Mailman/Bouncers/Postfix.py +++ b/Mailman/Bouncers/Postfix.py @@ -59,6 +59,7 @@ pcre = re.compile(r'\t\t\tthe postfix program$', re.IGNORECASE) acre = re.compile(r'<(?P<addr>[^>]*)>:') def findaddr(fp): + addrs = [] # simple state machine # 0 == nothing found # 1 == salutation found @@ -66,7 +67,7 @@ def findaddr(fp): while 1: line = fp.readline() if not line: - return None + break # preserve leading whitespace line = string.rstrip(line) # yes use match to match at beginning of string @@ -75,6 +76,6 @@ def findaddr(fp): elif state == 1 and line: mo = acre.search(line) if mo: - return [mo.group('addr')] - # hmm, probably not a postfix bounce - return None + addrs.append(mo.group('addr')) + # probably a continuation line + return addrs or None |
