[Mailman-Users] Subject line message filtering

Chris Nulk cnulk at scu.edu
Fri Feb 8 22:21:34 CET 2013


On 2/8/2013 11:44 AM, Richard Damon wrote:
> On 2/8/13 12:52 PM, Chris Nulk wrote:
>> Hello all,
>>
>> I am trying to stop a particular group of messages from going to
>> several of my lists.  I am looking at the Subject line of the message
>> to do the filtering and I am using the header_filter_rules in Spam
>> Filtering.  My regex filter is:
>>
>>       ^Subject:[\s\+]*\[.*\]\s+(Invitation|Canceled Event):.*
>>
>> and the Subject lines I am trying to catch and reject the message look
>> like:
>>
>>       Subject: [MYLIST] Invitation: Test event @ Thu Feb 28,
>>           2013 10:00 - 11:00 (mylistg at example.com)
>>
>> or
>>
>>       Subject: [MYLIST] Canceled Event: Test event @ Thu Feb 28,
>>           2013 10:00 - 11:00 (mylist at example.com)
>>
>>
>> I have set the action for the rule to reject, however, the messages
>> still get posted to the list.
>>
>> I have tested the regex above using the python interactive interpreter
>> and the regex does match the various inputs used.
>>
>> Can anyone tell me what the problem is with my regex?
>>
>> Also, can any of the sender/recipient filters cause the message to
>> bypass the spam filters?  The message pipeline is unchanged.
>>
>> Thanks,
>> Chris
> Make sure you have set the "Action" for the filter to some other than
> Defer or Accept.

I did set the "Action" to "Reject".

>
> A previous Accept that matches the message will override this filter.

Not a problem.  Yet.  I only have the one filter.

>
> Also, note that I think the filter it tested BEFORE the [MYLIST] is
> added to the subject by the list, so is only there to be matched if it
> was in the original email.
>
This was the answer.  Thank you.  I should have realized that but I just 
wanted to get it done so I can move on to other critical work. Taking 
out the [MYLIST] check from the regex worked and I could add back in 
addition constraints to the regex to make it more targeted.

Thanks again Richard.

Chris


More information about the Mailman-Users mailing list