Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27541

Modified Files:
      Tag: Release_2_1-maint
        SpamDetect.py 
Log Message:
Back out Revison 2.3.2.4 change.  Check outermost message header
even if it has X-List-Administrivia header ( mostly -owner notification ).


Index: SpamDetect.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/SpamDetect.py,v
retrieving revision 2.3.2.7
retrieving revision 2.3.2.8
diff -u -d -r2.3.2.7 -r2.3.2.8
--- SpamDetect.py       30 Dec 2005 18:50:08 -0000      2.3.2.7
+++ SpamDetect.py       31 Dec 2005 04:19:49 -0000      2.3.2.8
@@ -92,10 +92,7 @@
 
 
 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 @@
                 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())

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to