procmail
[Top] [All Lists]

Re: spam filtering for dummies

2000-02-06 04:46:28
Some comments on the recipes Chris posted. But before that, some
remarks on spam filtering.

As a general recommendation, I'd tell newbies to go get one of the
existing spam filter packages and take it from there. Spam Bouncer at
least has all the hooks for controlled filtering of problematic
domains and addresses, and all you need is to configure it and put the
bozos in a text file.

<http://www.iki.fi/era/procmail/links.html> has pointers to various
packages. The most popular seem to be Spam Bouncer, Junkfilter, and
Spamdunk (in no particular order).

Spamgard used to be fairly popular too, although I haven't seen it in
use for quite some time now. It can still have its uses if you know
who the people you want to receive mail from, and want to reject most
of the other stuff.

On Sat, 5 Feb 2000 21:35:35 -0500, Christopher Neill <noise(_at_)cow(_dot_)org>
wrote:
DUMMY=`if ! -d $MAILDIR || mkdir $MAILDIR`

I don't know under what shell this would not be a syntax error. Even
if it works for you, you might wish to change it to something more
portable. Probably DUMMY=`test -d $MAILDIR || mkdir $MAILDIR` is
reasonably close to what you're trying to say here. (It will still
fail if the parent directory of MAILDIR is missing, too.)

LOCKFILE=$HOME/.lockmail

Any particular reason you are using a global lock file? Most places
I've seen this it's just a Cargo Cult Copy of something in one of the
more unfortunate examples which are distributed with Procmail. If you
don't know what it does, perhaps you want to take it out.

:0:
* ^Subject.*(ad\:|advertis|market|free|promo|girls|porn)
spam

(You don't need to backslash the colon, although it doesn't hurt. You
have this in other places too.)

:0:  #throw out forged
* .*may be forged
spam

Do you have any statistics for the success rate of this rule? I see
this fairly frequently in legitimate mail. And the .* in front is a
waste, you should take it out.

:0B:
* http\://.*remove
spam

This may look good to you, but if somebody on a discussion list
mentioned an http:// URL and                         (line break here)
remove addresses in the same line of a posting, the posting would get
classed as spam. I generally recommend more caution with regular
expressions. If you can't come up with something more specific than .*
you might want to think about attacking the problem from a different
angle.

Hope this helps,

/* era */

#$Id: .procmailrc,v 1.38 2000/01/18 22:22:20 neill Exp $

Heh. My .procmailrc is at 1.438 and that's with most of the spam
filters in a separate file, since version 1.140 back in 1997. :-)

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

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