![](https://secure.gravatar.com/avatar/2bcbef233b0136cab09e391940df4713.jpg?s=120&d=mm&r=g)
Can someone please tell me if it is possible to bounce messages which contain certain keywords?
I recently switched from Majordomo to Mailman and cannot see how this is done.
Chris Smedley.
![](https://secure.gravatar.com/avatar/e542859f7cf390bcbcfd1957aa86eaf9.jpg?s=120&d=mm&r=g)
".Chris Smedley" wrote:
Two methods, one trivially easy to find that you should have found already, and one hidden:
Since you didn't mention the Spam-specific posting filters section of Privacy Options, I can only assume you haven't wandered through the pages of admin options yet. Go do that now, and look for one whose explanatory text starts with "Hold posts with header value", as it's clearly exactly what you need, and you could have found it on your own. I catch virtually all attachments this way, by adding
Content-type:.*multipart/.* :.*text/html.* :.*text/enriched.* :.*text/x-vcard.* Content-Disposition:.*attachment
The other is to add items to Mailman/Handlers/SpamDetect.py. Here's my diff to exclude posts from a certain user (and log them; you can only change KNOWN_SPAMMERS if you don't want a log):
Index: SpamDetect.py
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/SpamDetect.py,v retrieving revision 1.4 diff -r1.4 SpamDetect.py 28a29
![](https://secure.gravatar.com/avatar/e542859f7cf390bcbcfd1957aa86eaf9.jpg?s=120&d=mm&r=g)
".Chris Smedley" wrote:
Two methods, one trivially easy to find that you should have found already, and one hidden:
Since you didn't mention the Spam-specific posting filters section of Privacy Options, I can only assume you haven't wandered through the pages of admin options yet. Go do that now, and look for one whose explanatory text starts with "Hold posts with header value", as it's clearly exactly what you need, and you could have found it on your own. I catch virtually all attachments this way, by adding
Content-type:.*multipart/.* :.*text/html.* :.*text/enriched.* :.*text/x-vcard.* Content-Disposition:.*attachment
The other is to add items to Mailman/Handlers/SpamDetect.py. Here's my diff to exclude posts from a certain user (and log them; you can only change KNOWN_SPAMMERS if you don't want a log):
Index: SpamDetect.py
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/SpamDetect.py,v retrieving revision 1.4 diff -r1.4 SpamDetect.py 28a29
participants (2)
-
.Chris Smedley
-
Dan Mick