[Mailman-Users] Mailman Spam Filters
mark at msapiro.net
Wed Feb 8 17:49:09 EST 2017
Resending a less detailed reply because I inadvertently originally
replied only to the OP and have deleted that reply.
On 02/08/2017 09:57 AM, Barco van Rhijn wrote:
> Hi Mark,
> Thanks for your reply. I'll try to clarify:
> I'm using these regexps/phrases in the
> Privacy options... -> Spam filters page
> /Header filters /*Spam Filter Rule 1 *
> Spam Filter Regexp:
> She is mad|
The problem here is the '|'. It is an operator which says match either
the pattern to the left or the pattern to the right. In your case, the
pattern to the right is the null pattern which matches everywhere so
that pattern will always match.
> **I've used the new rules as opposed to the legacy rules on this page.
> And was not specific as to where mailman should look.
> To my understanding this includes the message headers, subject and body.
> Testing proved this to be true. Mailman holds messages with the phrase
> "mad" in the body or subject line.
I don't know how you tested, but the patterns in header_filter_rules are
matched only against message and sub-part headers, not against any body
To match against body text, you need a custom handler. See
<https://wiki.list.org/x/4030615> and the example MyHandler.py script
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