At 23:17 2000-09-15 +0200, Johannes Zellner wrote:
On Fri, Sep 15, 2000 at 08:57:48PM +0000, Tom Gilbert wrote:
> * Johannes Zellner (johannes(_at_)zellner(_dot_)org) wrote:
> > Hello,
> >
> > can someone give me a simple procmail recipe to filter
> > spam mails ? -- I've several addresses which are considered
> > to be spam. Ideally the recipe should
> > 1) save the spam to /dev/null
>
> A more general way is this:
>
> SPAMMERS=$HOME/.procmail/spammers
beware having elements in this file which may be interpreted as a subset of
another item.
"et.com" would match "spirouet.com" for instance. "mail.com" would match
"freemail.com", "hotmail.com", "yourmail.com", etc. - as well as
"mail.company.com"...
do I need a /trailing/ .* ? -- E.g.
* ^From:(_dot_)*bill(_at_)microsoft(_dot_)com(_dot_)*
No, because the match is a minimal match to begin with - the match is made
when the text specified is found.
However, you should get into the habit of escaping the dots which should be
matched AS dots (in regexp, a dot is a wildcard, * is "match 0 or more" -
so ".*" is "match 0 or more of whatever", and "." is "match one of
whatever" -- to match a DOT, and only a DOT, you need "\."). Recipes
without the escape tend to work fine because a period in the text being
matched meets the wildcard, but then so would "microsofticom" (yea, not
likely to be seen, which is why failing to escape them generally doesn't
pose a problem -- but that's still not an excuse for not properly escaping
them).
---
Please DO NOT carbon me on list replies. I'll get my copy from the list.
Sean B. Straw / Professional Software Engineering
Post Box 2395 / San Rafael, CA 94912-2395
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail