[Mailman-Users] Subject line message filtering

Mark Sapiro mark at msapiro.net
Tue Feb 12 03:40:03 CET 2013


Chris Nulk wrote:

>On 2/8/2013 4:28 PM, Mark Sapiro wrote:
>> Chris Nulk wrote:
>>
>>> My regex filter is:
>>>
>>>        ^Subject:[\s\+]*\[.*\]\s+(Invitation|Canceled Event):.*
[...]
>The [\s\+]* was deliberate.  Most of our lists but the list name in 
>brackets ('[', ']'), however, we have a few lists that are members of 
>another list.  For those lists the list subject prefix is a plus-sign 
>('+').


OK, I get it


>The only issue I have now is the boss wants to be able to send a reject 
>message if a message is rejected when it matches a rule.  The only 
>option I have is to hold the message and let the moderator send the 
>rejection notice.  And since, the header rule is for our global lists, I 
>am the lucky moderator.


If you mean you want to reject the message with something other than
the "Message rejected by filter rule match" message, then you are
correct unless you want to modify the message in the SpamDetect.py
module, i.e. change the message in

                    raise Errors.RejectMessage(
                        _('Message rejected by filter rule match'))

Making it something like:

                    raise Errors.RejectMessage(
                        _("""Some long winded,
                          Multiple line
                          Rejection message
                          """))

However, I hope these are just legitimate notifications that shouldn't
have been sent to a list and not spam. It is a very bad idea to reject
anything that might be spam because the rejection almost certainly
goes to some innocent 3rd party whose address was spoofed in the
message's headers. This is known as backscatter and is bad.


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