Update Spamassassin

image_print

Install missing packages

sa-update -D
.
.
Apr 13 07:52:34.032 [13399] dbg: diag: [...] module not installed: Razor2::Client::Agent ('require' failed)
.
.
Apr 13 07:52:34.032 [13399] dbg: diag: [...] module not installed: Encode::Detect::Detector ('require' failed)
.
.
Apr 13 07:52:34.032 [13399] dbg: diag: [...] module not installed: BSD::Resource ('require' failed)
.
perl -MCPAN -e shell
cpan[1]> install Razor2::Client::Agent
cpan[2]> install Encode::Detect::Detector
cpan[3]> install BSD::Resource

Install additional spamassassin rulesets

of Schaal-IT and Heinlein Support.

sa-update --nogpg --channel sa.schaal-it.net
sa-update --nogpg --channel spamassassin.heinlein-support.de

Setup cronjob

vi /etc/cron.hourly/sa-update
#!/bin/sh

# schaal @it
#
# Simple script to update SpamAssassin

SYSLOG_TAG=sa-update

compile=0

logger -d -t $SYSLOG_TAG "Start SA-Update"

sa-update --nogpg
retval="$?"
if [ $retval -eq 0 ]; then compile=1; fi


sa-update --nogpg --channel updates.spamassassin.org
retval="$?"
if [ $retval -eq 0 ]; then compile=1; fi

sa-update --nogpg --channel sa.schaal-it.net
retval="$?"
if [ $retval -eq 0 ]; then compile=1; fi

#sa-update --nogpg --channel sought.rules.yerp.org
#retval="$?"
#if [ $retval -eq 0 ]; then compile=1; fi

sa-update --nogpg --channel spamassassin.heinlein-support.de
retval="$?"
if [ $retval -eq 0 ]; then compile=1; fi

if [ $compile -eq 1 ]; then
	logger -d -t $SYSLOG_TAG "SA-Update found"
	sa-compile
	/etc/init.d/amavis restart
else
	logger -d -t $SYSLOG_TAG "No SA-Update found"
fi
chmod 755 /etc/cron.hourly/sa-update

Rules are located at /var/lib/spamassassin/<version>/

X-Spam-Status

HS_HEADER … Heinlein Support, SCHAALIT_URI … Schaal IT

Test

spamassassin --lint -D