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
text.

To match against body text, you need a custom handler. See
<https://wiki.list.org/x/4030615> and the example MyHandler.py script
linked therefrom.

-- 
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]
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to