[Mailman-Users] About Spam Filtering

Mark Sapiro mark at msapiro.net
Tue Feb 12 07:37:29 CET 2013


METU E-List Admin wrote:
>
>--------------------------------------------
>$ bin/config_list -o - REGISTER | grep -A20 header_filter_rules
>header_filter_rules = [('^X-Mailer: (?!Microsoft Outlook .*)$', 7, 


This regexp won't work. The negative lookahead does not advance the
current position so your regexp says look for 'X-Mailer: ' at the
beginning of the line not followed by 'Microsoft Outlook .*' but
followed immediately by the end of the line, so it will only match a
header like 'X-Mailer: ' not followed by anything.

What you want is

^X-Mailer: (?!Microsoft Outlook .*).*$

or just

^X-Mailer: (?!Microsoft Outlook .*)

or maybe even just

^X-Mailer: (?!Microsoft Outlook )

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