procmail
[Top] [All Lists]

Re: spam filtering for dummies

2000-02-07 12:17:36
On Sat, Feb 05, 2000 at 06:53:58PM -0600, Janelle H wrote:
Thank you very much for your help Stan!  I think this might work!  Does it
search the entire email or just the header?  Also, what is the most
efficient way to search several addresses?
Does this following recipe do that or not?

:0:
* ^([^S]|S[^u])(_dot_)*(_at_)mailexcite\(_dot_)com
* ^([^S]|S[^u])(_dot_)*(_at_)mailandnews\(_dot_)com
* ^([^S]|S[^u])(_dot_)*(_at_)bigfoot\(_dot_)com
* ^([^S]|S[^u])(_dot_)*(_at_)bart\(_dot_)nl
$HOME/mail/filtered

Someone else already answered your second question, so I'll just address the
first one. By default procmail will only search the headers. To search the
headers AND body, you want to change your first line to
:0 HB:

Another trick I only recently discovered: if the path to your file does not
begin with a /, procmail automatically prepends the contents of $MAILDIR to
it. Thus you don't need to do "$HOME/mail/file", you can do just "file". Just
add "MAILDIR=$HOME/mail" at the top of your .procmailrc.
In practice, this makes no real difference, but if you are twiddling your
.procmailrc all the time, it reduces the potential for typos to mess up your
recipes.

-- 
Andrew Edelstein                email: andrew(_at_)infonent(_dot_)com
Core Services Division          voice: 408-278-4430
Infonent.com, Inc.
San Jose, CA

All opinions or statements are my own and are not official statments of either
Comms People, Inc. or Infonent.com, Inc./ Ideaflood, Inc.

<Prev in Thread] Current Thread [Next in Thread>