Sendmail
Spam and Virus Filtering Con't
Step 10: Spam Management and Removal (optional)
Up until now your Spam Filter is really just Spam Tagging,
Spamassassin does not delete messages. All
messages are still being delivered to the INBOX, but a Spam Flag is
Added (with values of yes or no) and a Spam-Level tag is added providing
the score (A higher score means that it is more likely to be spam). Any modern Mail
Client should be able to read the Spam Confidence Level (Score) on the tags and perform the
necessary action. However if you are providing webmail or have
IMAP clients you might want to set up the server to sort or delete the
obvious spam. To do this you must edit /etc/procmailrc
INCLUDERC=/etc/mail/spamassassin/spamassassin-default.rc
#This allows SpamAssassin to use the main Bayesian DB
DROPPRIVS=yes
# SpamAssassin sample procmailrc
#
#
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
#
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.
# This should already be in /etc/mail/spamassassin/spamassassin-default.rc
# Uncomment if it is empty or non-existent.
#
# :0fw: spamc.lock
# * < 256000
# | spamc
# Mails with a score of 15 or higher are almost certainly spam (with
# 0.05% false positives according to rules/STATISTICS.txt).
#Let's delete them. (This one is optional)
#WARNING- this turns on spam deletion!
#If you have any false positives these messages are not retrievable!
#Each \* Represents one point, to make deletion more sensitive change
# the number of \*. Right now you can see that there are 15 of
them.
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*
/dev/nul
# All mail tagged as spam (eg. with a score higher than the set
threshold)
# is moved to "spam".
:0:
* ^X-Spam-Status: Yes
Spam
# Work around procmail bug: any output on stderr will cause the
# "F" in "From" to be dropped. This will re-add it.
:0
* ^^rom[ ]
Step 11: Turn on the Spam Services
service sendmail stop
chkconfig sendmail on
chkconfig clamav-milter on
chkconfig spamassassin on
chkconfig spamass-milter on
service clamav-milter start
service spamassassin start
service spamass-milter start
service sendmail start
Step 12: Check your Logfiles for Errors
tail -n 30 /var/log/maillog
tail -n 30 /var/log/messages
Your Sendmail server is now Rockin'!
Troubleshooting
Your Spam Configuration
References:
Sample Sendmail
configuration file
Spam proof and Virus Filtering e-mail server -
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=4938
Centralized Spam Filtering:
http://www.stearns.org/doc/spamassassin-setup.current.html#sitewide
Spam Assassin Configurator:
http://www.yrex.com/spam/spamconfig.php
Article last reviewed: 12/29/2006
|
Created by: Digital Foundation,
inc.
Copyright © 2002-2005 Digital Foundation,
inc.
www.networkclue.com
|
|
|
All content of the NetworkClue website is copyrighted. Articles, notes,
outlines, and all other materials may not be stored on the Internet or sold or
placed by themselves or with other material in any electronic or printed format in whole or
part. However materials may be referenced by links to the site.
|