[CentOS] spam control

Wed Oct 25 04:30:10 UTC 2006
Paul Heinlein <heinlein at madboa.com>

On Tue, 24 Oct 2006, Jerry Geis wrote:

> Gents,
>
> I have added the following to /etc/mail/sendmail.mc and rebuilt it 
> trying to control spam. I still get about 25 spam messages a day. Is 
> there something else that can help control spam?

CentOS provides spamassassin 3.0.6, but I've installed spamassassin 
3.1.7 and spamass-milter from rpmforge. Running your spam scanner as a 
milter allows you to reject egregious during the SMTP transaction.

I haven't done as much tuning as I'd like, but my current setup 
includes

INPUT_MAIL_FILTER(
   `clamav-milter',
   `S=local:/var/clamav/clmilter.sock, F=T, T=S:3m;R:3m')
INPUT_MAIL_FILTER(
   `spamassassin',
   `S=unix:/var/run/spamass.sock, F=, T=C:15m;S4m;R:4m;E:10m')
define(
   `confMILTER_MACROS_CONNECT',
   `b, j, _, {daemon_name}, {if_name}, {if_addr}')
FEATURE(`dnsbl', `sbl-xbl.spamhaus.org',
   `"554 Mail rejected - http://www.spamhaus.org/query/bl?ip="$&{client_addr}')


The percentage of messages rejected during SMTP transactions breaks 
down (for me) like this:

   74% == spamhaus
   21% == spamassassin
    2% == unresolvable sender domain
   <1% == clamav

There's a range of spam (scores 5.0 - 10.0) that's accepted for 
delivery but marked as spam; people can procmail those as they see 
fit.

I think the spamhaus numbers get inflated because the sending servers 
are typically bots that are set to try delivery several times before 
giving up.

-- 
Paul Heinlein <> heinlein at madboa.com <> www.madboa.com