summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/SpamDetect.py
diff options
context:
space:
mode:
authortkikuchi2005-12-31 06:45:06 +0000
committertkikuchi2005-12-31 06:45:06 +0000
commite04d647d939bba8c6c2f4be6af53f2dcfb2838ca (patch)
tree67c7be32c36a20e5712953017a0cb4f22c224998 /Mailman/Handlers/SpamDetect.py
parent2ccf70ba769013e94824c8d5cf384fc797d79045 (diff)
downloadmailman-e04d647d939bba8c6c2f4be6af53f2dcfb2838ca.tar.gz
mailman-e04d647d939bba8c6c2f4be6af53f2dcfb2838ca.tar.zst
mailman-e04d647d939bba8c6c2f4be6af53f2dcfb2838ca.zip
On my second thought, I use msgdata for internally crafted message checking.
The keyword 'reduced_list_headers' is taken from CookHeaders.py.
Diffstat (limited to 'Mailman/Handlers/SpamDetect.py')
-rw-r--r--Mailman/Handlers/SpamDetect.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Mailman/Handlers/SpamDetect.py b/Mailman/Handlers/SpamDetect.py
index 3f99e4b4d..352b18fc4 100644
--- a/Mailman/Handlers/SpamDetect.py
+++ b/Mailman/Handlers/SpamDetect.py
@@ -92,7 +92,8 @@ class HeaderGenerator(Generator):
def process(mlist, msg, msgdata):
- if msgdata.get('approved'):
+ if msgdata.get('approved') or msgdata.get('reduced_list_headers'):
+ # TK: 'reduced_list_headers' is intenally crafted message (virgin).
return
# First do site hard coded header spam checks
for header, regex in mm_cfg.KNOWN_SPAMMERS:
@@ -105,10 +106,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())