[plug] E-mail Setup for spam filtering - Fetchmail-Procmail-ASK-Kmail ?

Matthew Hawkins matthew at topic.com.au
Tue Jan 8 15:26:39 EST 2002

On Tue, 08 Jan 2002, Daniel wrote:
> - Fetchmail [needs an MTA.  Then allows all your system MTA's filtering, 
> forwarding, and aliasing facilities to work just as they would on normal 
> mail.]

Fetchmail does not need an mta.  Never has.  Its somewhat more reliable
if you do use a local MTA however (many MDA's won't report failure and
you can lose mail, which is against the RFC's)

> Mail Transfer Agent - Procmail [mail processing - seems to be used by good 
> anti-spam scripts] or Qmail or Exim or Sendmail

Procmail is not an MTA.  It is a MDA (mail delivery agent) which is what
a real MTA uses to deliver mail locally.

> Anti-Spam Scripts [pointers greatly appreciated]
> Spambouncer- seems very thorough and to have quite a following and be 
> updated regularly ... Procmail focused.
> Active Spam Killer (ASK)- likewise seems good. Procmail focused.
> Mail User Agent - Gui - Gnome - Evolution, or KDE - Kmail [needs to be able 
> to deal with maildir file format].

Somewhat irrelevent to anti-spam, since if the spam has reached this
stage you have lost - its in your mailbox!  But you'll want to use one
that makes it easy to identify and remove spam.

> How about - Fetchmail-Procmail-Ask-Kmail?
> Am I heading in the right direction?

Yes.  For reliability I would use a MTA like postfix on the box.  Add
procmail or maildrop (both support filtering and Maildir delivery) as
the MDA, and use some popular filtering scripts like John Hardin's
procmail ones.  Have fetchmail deliver via the MTA.  You can get the MTA
to filter as well, for example in postfix have some header_checks and/or
body_checks parameters giving PCRE regexp's matching common spam and
trashing it, anything passing this simple stuff can then get filtered by
procmail or maildrop.

One thing I do in my MUA (mutt) is colour messages flagged as
"potentially spam".  This includes headers added by procmail etc as well
as messages not destined to myself or lists I am on.  They show up very
obvious in the index and usually the subject line gives it away, very
easy to then tag-delete all spam that has gotten through (and some will,
they're crafty buggers).

Another nice anti-spam setup I've seen (using procmail) is from Linus
Torvald's old friend Lars Wirzenius.  He divided his mail into three
categories (wanted, not wanted, and unsure).  Anyone on the whitelist
would have their mail delivered.  Anyone on the blacklist would have
their mail rejected.  Anyone on the grey list had to reply with a token
that would then deliver their mail, otherwise it got rejected.  A very
simple variation on this is to note that the only mail you really want
to read is stuff addressed to you, or directed to you via a list you
have subscribed to.  So you can instantly mark anything else as spam.
This should be easily done in your MUA without the need for any tools
like procmail etc.


More information about the linux mailing list