SpamAssassin

Centos

Installing Additional Libraries for Spamassassin and sa-update

Some of these libraries come out of Dag

yum install perl-libwww-perl perl-Archive-Tar perl-IO-Zlib perl-IO-Socket-SSL perl-IO-Socket-INET6 perl-Mail-SPF-Query perl-Net-Ident perl-IP-Country perl-Net-IP perl-Net-DNS

SpamAssassin Update

[WWW] http://wiki.apache.org/spamassassin/RuleUpdates

[WWW] http://saupdates.openprotect.com/

Might need to create these directories

mkdir /etc/mail/spamassassin/sa-update-keys
chmod 700 /etc/mail/spamassassin/sa-update-keys
mkdir /var/lib/spamassassin
SARE Rules from OpenProtect

Setting up the Openproject Channel Update

wget http://saupdates.openprotect.com/pub.gpg
sa-update --import pub.gpg
rm pub.gpg
Regular Spamassassin Rules Updates
wget http://spamassassin.apache.org/updates/GPG.KEY
sa-update --import GPG.KEY
rm GPG.KEY
Script to Run Update Nightly

Can be put in /etc/cron.daily

#!/bin/sh

# Update the link to the correct version
VERSION=`grep -m 1 -E 'VERSION = '  /usr/lib/perl5/vendor_perl/*/Mail/SpamAssassin.pm | cut -f2 -d\"`
rm /var/lib/spamassassin/current
ln -s /var/lib/spamassassin/${VERSION} /var/lib/spamassassin/current

# Update from http://saupdates.openprotect.com & updates.spamassassin.org
# Restart AMaViS so that it reads in the new rules
sa-update --gpgkey D1C035168C1EBC08464946DA258CDB3ABDE9DC10 --channel saupdates.openprotect.com --gpgkey 26C900A46DD40CD5AD24F6D7DEE01987265FA05B --channel updates.spamassassin.org && /etc/init.d/spamassassin restart >/dev/null

Additions to /etc/mail/spamassassin/local.cf

# OpenProtect SAUpdates
include /var/lib/spamassassin/current/saupdates_openprotect_com.pre
include /var/lib/spamassassin/current/saupdates_openprotect_com.cf

# Standard SA Updates
include /var/lib/spamassassin/current/updates.spamassassin.org.pre
include /var/lib/spamassassin/current/updates.spamassassin.org.cf

SURBL

/etc/mail/spamassassin/spamcop_uri.cf:

urirhsbl URIBL_SC_SURBL sc.surbl.org. A
header URIBL_SC_SURBL eval:check_uridnsbl('URIBL_SC_SURBL')
describe URIBL_SC_SURBL Contains a URL listed in the sc.surbl.org blocklist
tflags URIBL_SC_SURBL net
score URIBL_SC_SURBL 4.0

urirhsbl URIBL_WS_SURBL ws.surbl.org. A
header URIBL_WS_SURBL eval:check_uridnsbl('URIBL_WS_SURBL')
describe URIBL_WS_SURBL Contains a URL listed in sa-blacklist
tflags URIBL_WS_SURBL net
score URIBL_WS_SURBL 3.0

urirhsbl URIBL_OB_SURBL ob.surbl.org. A
header URIBL_OB_SURBL eval:check_uridnsbl('URIBL_OB_SURBL')
describe URIBL_OB_SURBL Contains a URL listed in ob.surbl.org
tflags URIBL_OB_SURBL net
score URIBL_OB_SURBL 4.0

urirhsbl URIBL_AB_SURBL ab.surbl.org. A
header URIBL_AB_SURBL eval:check_uridnsbl('URIBL_AB_SURBL')
describe URIBL_AB_SURBL Contains a URL listed in ab.surbl.org
tflags URIBL_AB_SURBL net
score URIBL_AB_SURBL 5.0

Razor

[WWW] http://razor.sourceforge.net/

yum install gcc cpp glibc-devel glibc-headers glibc-kernheaders

wget http://easynews.dl.sourceforge.net/sourceforge/razor/razor-agents-2.82.tar.bz2
tar -xvjf razor-agents-2.82.tar.bz2
cd razor-agents-2.82
perl Makefile.PL
make test

make install

cd ..
rm -rf razor-agents-2.82 razor-agents-2.82.tar.bz2

yum remove gcc cpp glibc-devel glibc-headers glibc-kernheaders

ImageInfo

[WWW] http://www.rulesemporium.com/plugins.htm

cd /etc/mail/spamassassin
wget http://www.rulesemporium.com/plugins/imageinfo.cf
echo -e "\n# ImageInfo Plugin\n#\nloadplugin Mail::SpamAssassin::Plugin::ImageInfo" >> init.pre
cd /usr/lib/perl5/vendor_perl/*/Mail/SpamAssassin/Plugin/
wget http://www.rulesemporium.com/plugins/ImageInfo.pm
/etc/init.d/spamassassin restart

FuzzyOCR

yum install ImageMagick gocr libungif-progs

yum install rpm-build

wget http://easynews.dl.sourceforge.net/sourceforge/cpan2rpm/cpan2rpm-2.027-1.noarch.rpm
rpm -ivh cpan2rpm-2.027-1.noarch.rpm
rm cpan2rpm-2.027-1.noarch.rpm

cpan2rpm -i String::Approx
yum remove cpan2rpm rpm-build


cd /etc/mail/spamassassin
wget http://users.own-hero.net/~decoder/fuzzyocr/fuzzyocr-2.3b.tar.gz
tar -xvzf fuzzyocr-2.3b.tar.gz
cp FuzzyOcr-2.3b/FuzzyOcr.* /etc/mail/spamassassin
rm -rf fuzzyocr-2.3b.tar.gz FuzzyOcr-2.3b
mv FuzzyOcr.words.sample FuzzyOcr.words

Testing Spamassassin

spamassassin -D --lint 2>&1 | less

last edited 2006-11-28 06:06:16 by MichaelBest