[Mailman-Users] Re: mailman filtering problem
Amanda
arandall at auntminnie.com
Tue Sep 11 17:56:29 CEST 2001
Allan,
You must have misinterpreted my mail - I'm not using spamdetect.py to
filter my mail. I do have some familiarity with using regexp's to
filter mail based on sender, subject, body, or a combination of the
above, although it's not going to help you much in this particular
instance - what you need is not a list of regular expressions to help
you weed out crap, but assistance in editing the Python file itself.
::shrug:: Sorry ... maybe someone else on the list can offer some
advice.
Thanks,
=)
Amanda
Allan Garcia wrote:
>
> hello,
> ive seen through your post regarding blocking a certain body of the
> message from not propagating to the list. ive edited the
> Spamdetect.py and let it recreate it and still i can't block the
> message that has the out of the office expression. below is my
> Spamdetect.py file and hope you can shed light to my problem. btw
> when i changed it to subject, then it can block an email that has
> the subject i will be out of the office in it.
>
> KNOWN_SPAMMERS = [('None', 'i will be out of the office')]
>
>
> ^L
> def process(mlist, msg, msgdata):
> if msgdata.get('approved'):
> return
> for header, regex in KNOWN_SPAMMERS:
> cre = re.compile(regex, re.IGNORECASE)
> if header is None:
> text = msg.body
> else:
> text = msg.get(header)
> if not text:
> continue
> mo = cre.search(text)
> if mo:
> # we've detected spam, so throw the message away
> raise SpamDetected
>
>
>
> regards,
> allan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/mailman-users/attachments/20010911/15126710/attachment.htm
More information about the Mailman-Users
mailing list