[EMAIL PROTECTED] wrote: >The esteemed Mark Sapiro has said: >> >> [EMAIL PROTECTED] wrote: >> >> >Is there a recipe to put in the spam filters that will trap a totally >> >empty subject line in a message? This get posted to a list with >> >(no subject) in the subject line, but this is evidently added after >> >the spam filter check. >> >> >> Try the following regexp in header_filter_rules with a Hold action >> >> ^subject:\s*(\(no subject\))?\s*$ >> >I put that line in the spam filter (actually, copied and pasted it). > >I'm still seeing the first post with a null subject line blasting >through without getting trapped. It shows up as (no subject) when >distributed by the list, but isn't trapped until it's gone out to the >list (too late). > >All the responses, of course, get trapped by the preexisting trap. > >I did try >subject:\n > >But that traps a bunch of mangled subject lines where the user's MUA >has munged the original to add spaces.
The original regexp in header_filter_rules should catch any subject header consisting only of white space and zero or one occurrences of '(no subject)'. I think the issue may be that the incoming post has no Subject: header at all rather than an empty one. In this event, if there is a subject_prefix, Mailman will add a Subject: header with the list prefix and '(no subject)'. If there is no subject_prefix, the message will be sent from Mailman with no Subject: header. If that is the issue, you need 3 header_filter_rules. The first is as above to catch the empty or (no subject). The second is with a regexp of ^subject: and an action of accept to accept the remaining messages with Subject: headers, and the third has a regexp ^. and an action of hold to hold all messages that fall through the second. If you have other header_filter_rules, they should come before the accept rule (#2) or they won't be reached. -- Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list [email protected] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
