[Mailman-Users] Having trouble with spam filters syntax

Mark Sapiro mark at msapiro.net
Fri Sep 3 05:53:45 CEST 2010


Kit Crawford wrote:
>
>I can't seem to get the correct syntax for filtering based on the Subject
>line.  I want to auto-accept all email that contains the phrase "Digital
>Commons" in the Subject line.
>
>I am using Mailman version 2.1.9.  I've run some tests and the Subject line
>header for every test is:
>
>Subject: Interested in Digital Commons tour
>
>and the action is set to Accept.
>
>The following regex filters did not work:
>
>subject: .*digital commons
>
>^subject: .*digital commons
>
>\nsubject: .*digital commons
>
>Subject: .*Digital Commons
>
>^Subject: .*Digital Commons
>
>\nSubject: .*Digital Commons
>
>subject: .*digital commons.*
>
>^subject: .*digital commons.*
>
>\nsubject: .*digital commons.*
>
>Subject: .*Digital Commons.*
>
>^Subject: .*Digital Commons.*
>
>\nSubject: .*Digital Commons.*
>
>Not sure what other syntax to try!  If anyone has any insight on this vexing
>problem, I surely would appreciate some assistance.


All of the above should work, but the ones that don't start with '^' or
'\n' may be too generous. e.g. they will accept

X-Bogus-Header: something about a subject: with digital commons

I suspect your underlying issue is that the 'accept' action for
header_filter_rules does not mean accept this post bypassing all other
potential membership checks and miscellaneous holds. It just means
pass the header_filter_rules check.

If you want to unconditionally accept a message based on the Subject:
header, you need to create a custom handler for that. See the FAQ at
<http://wiki.list.org/x/l4A9>.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list