Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31343
Modified Files:
Tag: Release_2_1-maint
SpamDetect.py
Log Message:
Avoid infinite loop of held message and its notifications.
Index: SpamDetect.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/SpamDetect.py,v
retrieving revision 2.3.2.3
retrieving revision 2.3.2.4
diff -u -d -r2.3.2.3 -r2.3.2.4
--- SpamDetect.py 21 Mar 2005 04:40:20 -0000 2.3.2.3
+++ SpamDetect.py 4 Jul 2005 02:31:07 -0000 2.3.2.4
@@ -91,7 +91,11 @@
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 @@
# 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())
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org