[Mailman-Users] Bouncing

Dan Mick Dan.Mick at west.sun.com
Thu Aug 31 21:08:41 CEST 2000


".Chris Smedley" wrote:
> 
> 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.


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
> from Mailman.Logging.Syslog import syslog
40c41
< KNOWN_SPAMMERS = []
---
> KNOWN_SPAMMERS = [('from', 'danyb at earthlink.net')]
57a59
>             syslog("bounce", "message discarded: %s: %s" % (header, regex))




More information about the Mailman-Users mailing list