[Techtalk] Block Spam Email Based on Body Text

Andrea Landaker qirien at icecavern.net
Wed Dec 17 09:46:12 EST 2003


> I have Red Hat Linux 7.3 with sendmail 8.11.
>
> I want to block all spam email based on body text like if any text in body
> of email contains "Banded CD" text then sendmail auto reject that mail.

I highly recommend SpamAssassin (www.spamassassin.org).  You can run it 
locally from your mail client, or on the mail server.  It uses body text, 
header text, blacklists, and Bayesian analysis to determine if an e-mail is 
Spam or not.  In my experience, I have never had it mark a non-spam e-mail as 
spam, and it usually marks about 97% of spam as spam.

http://www.stearns.org/doc/spamassassin-setup.current.html is a long and 
detailed document about how to setup SpamAssassin in various ways.

You probably don't want to just have sendmail reject the mail -- just in case 
there are false positives, you don't want to lose any mail without giving a 
warning, and you don't want to send a warning to spammers just to get a 
bounce message back.  IMHO it's better to mark it and put it in a Spam folder 
so users can decide if they want to wade through it looking or false 
positives, or just delete them all.

-- 
Andrea Landaker
http://www.icecavern.net/~qirien/



More information about the Techtalk mailing list