summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2001-10-04 14:37:55 +0000
committerbwarsaw2001-10-04 14:37:55 +0000
commit3e167b1ef0a40ceacd08658c3ff6ab6972171374 (patch)
treefe94ebb59b753e09ae5cb0daa9dc378bc0e423fe
parent9a865a23436139c1ce7fc0cfcdb0c7d1314a514c (diff)
downloadmailman-3e167b1ef0a40ceacd08658c3ff6ab6972171374.tar.gz
mailman-3e167b1ef0a40ceacd08658c3ff6ab6972171374.tar.zst
mailman-3e167b1ef0a40ceacd08658c3ff6ab6972171374.zip
process(): Dan Mick discovers a hold over from the mimelib days.
-rw-r--r--Mailman/Bouncers/Qmail.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Mailman/Bouncers/Qmail.py b/Mailman/Bouncers/Qmail.py
index e1e7ac2ea..d6fc732eb 100644
--- a/Mailman/Bouncers/Qmail.py
+++ b/Mailman/Bouncers/Qmail.py
@@ -26,7 +26,7 @@ This module should be conformant.
"""
import re
-import email
+import email.Iterators
introtag = 'Hi. This is the'
acre = re.compile(r'<(?P<addr>[^>]*)>:')
@@ -34,17 +34,13 @@ acre = re.compile(r'<(?P<addr>[^>]*)>:')
def process(msg):
- mi = email.Iterators.body_line_iterator(msg)
addrs = []
# simple state machine
# 0 = nothing seen yet
# 1 = intro paragraph seen
# 2 = recip paragraphs seen
state = 0
- while 1:
- line = mi.readline()
- if not line:
- break
+ for line in email.Iterators.body_line_iterator(msg):
line = line.strip()
if state == 0 and line.startswith(introtag):
state = 1