[Mailman-Users] How Does Spam Filter Regex Processing Work?

Mark Sapiro msapiro at value.net
Tue Feb 22 22:16:11 CET 2005

Kevin Redden wrote:
>I'm am having a problem getting the Spam filters to work properly. This same
>problem was experienced with both the 2.1.5 and now with the 2.1.6b4 release.
>We are trying to put in Spam filters to catch keywords or phrases in the subject
>line of posts to keep trouble topics off the list. Sometimes they  work, but
>sometimes we can't come up with a filter to catch the phrase.
>I've got a copy of RegexBuddy that I test my regex statements with, and it
>reports my regular expressions should be working - yet the posts go through,
>missed by the subject filters. The filters also seem to work differently
>depending on whether we use the new header filters or the old legacy filters.

The bounce_matching_headers filters actually specify a header/regex
combination. e.g.

to: some regex

says match some regex against the contents of the To: header.

The header_filter_rules specify regexps to match anywhere in the
message headers.

>Has anyone written or found any documentation that details how Spam filters
>(both header filers and the old legacy filters) work in Mailman?

The header_filter_rules are processed in Mailman/Handlers/SpamDetect.py.

The bounce_matching_headers are processed in Mailman/Handlers/Hold.py
using the hasMatchingHeader() method defined in Mailman/MailList.py

To go beyond the info on the admin web interface I think you have to
look at the code.

Mark Sapiro <msapiro at value.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