[Mailman-Users] python regex help

Eric D. Christensen edc at proadmin.com
Thu Jan 22 17:15:49 CET 2004


Maybe I'm just clueless, but I'm having a bit of trouble getting
header_filter_rules working. Before I go searching deeper, I want to
make sure my python regex is correct. I'm not much of a python hack...

The regex I've got in header_filter_rules is:

^Subject: \[SPAM\]

An example header line that this should catch, but doesn't is:

Subject: [SPAM] (9.10/5.00) Settlement Notice 

Obviously, I'm trying to catch messages that the MTA has already tagged
as spam via SpamAssassin and discard them. But they get trapped and held
as "Post by non-member to a members-only list" just like if I didin't
have anything in the header_filter_rules. 

Either my regex isn't matching the way I understand python regex's to
work (which is entirely based on a quick scan of the manpage), or the
"non-member" filter is triggering before the SpamDetect handler for some
reason. 

Sadly, the debug capabilities with the new header_filter_rules feature
as of 2.1.4 are pretty limited (nonexistent). I've modified logging a
bit to at least log something meaningful in vette when there is a match,
but I can't seem to get anything to match to verify that even that is
working.

-- 
Eric D. Christensen <edc at proadmin.com>
Proadmin, Inc.





More information about the Mailman-Users mailing list