diff options
author | tkikuchi <> | 2005-12-31 04:19:49 +0000 |
---|---|---|
committer | tkikuchi <> | 2005-12-31 04:19:49 +0000 |
commit | cee6753b319a1687b3df6e19474c79597b214d32 (patch) | |
tree | b7d184e80589fe18909c0189dd866c62ad9f0947 /Mailman | |
parent | 442d024ad3a0590eb23b29d7534564e1c27ce928 (diff) | |
download | mailman2-cee6753b319a1687b3df6e19474c79597b214d32.tar.gz mailman2-cee6753b319a1687b3df6e19474c79597b214d32.tar.xz mailman2-cee6753b319a1687b3df6e19474c79597b214d32.zip |
Back out Revison 2.3.2.4 change. Check outermost message header
even if it has X-List-Administrivia header ( mostly -owner notification ).
Diffstat (limited to 'Mailman')
-rw-r--r-- | Mailman/Handlers/SpamDetect.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Mailman/Handlers/SpamDetect.py b/Mailman/Handlers/SpamDetect.py index 79dc40dc..3f99e4b4 100644 --- a/Mailman/Handlers/SpamDetect.py +++ b/Mailman/Handlers/SpamDetect.py @@ -92,10 +92,7 @@ class HeaderGenerator(Generator): def process(mlist, msg, msgdata): - # Don't check for spam 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'): + if msgdata.get('approved'): return # First do site hard coded header spam checks for header, regex in mm_cfg.KNOWN_SPAMMERS: @@ -107,8 +104,11 @@ def process(mlist, msg, msgdata): raise SpamDetected # Now do header_filter_rules # TK: Collect headers in sub-parts because attachment filename - # extension may be a clue to possible virus/spam. - if msg.is_multipart(): + # 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',''): headers = '' for p in msg.walk(): g = HeaderGenerator(StringIO()) |