diff options
author | tkikuchi <> | 2005-07-04 02:31:07 +0000 |
---|---|---|
committer | tkikuchi <> | 2005-07-04 02:31:07 +0000 |
commit | 6e9d409cbad93b18497d62717a0bff6cf11bda75 (patch) | |
tree | 88fb60c75f1becebb9e6fa0a66ebf78fc7965413 /Mailman/Handlers/SpamDetect.py | |
parent | 28f9180d399bce3937f8c1df4fc90d23a9d4c72a (diff) | |
download | mailman2-6e9d409cbad93b18497d62717a0bff6cf11bda75.tar.gz mailman2-6e9d409cbad93b18497d62717a0bff6cf11bda75.tar.xz mailman2-6e9d409cbad93b18497d62717a0bff6cf11bda75.zip |
Avoid infinite loop of held message and its notifications.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/SpamDetect.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Mailman/Handlers/SpamDetect.py b/Mailman/Handlers/SpamDetect.py index 68fbf931..297a4cc7 100644 --- a/Mailman/Handlers/SpamDetect.py +++ b/Mailman/Handlers/SpamDetect.py @@ -91,7 +91,11 @@ class HeaderGenerator(Generator): def process(mlist, msg, msgdata): - if msgdata.get('approved'): + # Don't check if the message has been approved OR it is generated + # internally for administration because holding '-owner' notification + # may cause infinite loop of checking. (Actually, it is stopped + # elsewhere.) + if msgdata.get('approved') or msg.get('x-list-administrivia'): return # First do site hard coded header spam checks for header, regex in mm_cfg.KNOWN_SPAMMERS: @@ -104,10 +108,7 @@ def process(mlist, msg, msgdata): # Now do header_filter_rules # TK: Collect headers in sub-parts because attachment filename # extension may be a clue to possible virus/spam. - # Check also 'X-List-Administrivia' header if the message was owner - # notification. Held message may be attached and have matching header - # which may cause infinite loop of holding. - if msg.is_multipart() and not msg.get('x-list-administrivia',''): + if msg.is_multipart(): headers = '' for p in msg.walk(): g = HeaderGenerator(StringIO()) |