SpamAssassin Install

From Wiki
Jump to: navigation, search

Once postfix is running you need to install SA to filter out spam.

wget http://mirrors.isc.org/pub/apache/spamassassin/source/Mail-SpamAssassin-3.1.9.tar.bz2
tar xjvf Mail-SpamAssassin-3.1.9.tar.bz2
cd Mail-SpamAssassin-3.1.9
perl Makefile.PL 
make
make install

Start up spamd, add to boot scripts:

spamd &

Set up .procmailrc under $HOME:

DEFAULT=/export/home/wattersm/Maildir/
MAILDIR=/export/home/wattersm/Maildir/
LOGFILE=/export/home/wattersm/logs/procmail.log

SPAMFOLDER=/export/home/wattersm/Maildir/.Junk/
#
# SpamAssassin check
:0 wf
| /usr/bin/spamc


# File as SPAM
:0 w :$SPAMFOLDER/.lock
* ^X-spam-status: Yes
$SPAMFOLDER/.

:0e
{
   EXITCODE=$?
}

:0
* ^FROM(LW Nagios)
.Nagios/

:0
* ^SUBJECT[Example Web, Inc. ID*]
.Support/