aptitude update aptitude install spamc spamassassin clamav-daemon clamav-freshclam pyzor razor libmail-dkim-perl
Install DCC-client from source since the Debian package is old
aptitude install build-essential /usr/sbin/useradd -c "DCC" -s /bin/bash -d /var/dcc -m -k /dev/null -K UID_MIN=50 -K UID_MAX=100 dcc cd /usr/src wget -c http://www.rhyolite.com/dcc/source/dcc.tar.Z tar xzf dcc.tar.Z cd dcc* ./configure --with-uid=dcc --disable-server --disable-dccm make -j4 make install sed -i 's/^DCCIFD_ENABLE=off/DCCIFD_ENABLE=on/' /var/dcc/dcc_conf
Add to <tt>/etc/rc.local</tt>:
/var/dcc/libexec/start-dccifd
<tt>/etc/default/spamassassin</tt>:
ENABLED=1 OPTIONS="--max-children 5 -x -u debian-spamd" NICE="--nicelevel 15" CRON=1
<tt>crontab -e -u debian-spamd</tt>:
#@daily /usr/bin/sa-learn --force-expire --dbpath ~spamd/.spamassassin @daily mv -f /var/lib/spamassassin/.razor/razor-agent.log{,.old} @daily mv -f /var/lib/spamassassin/.spamassassin/bayes_seen{,.old}
<tt>/etc/spamassassin/local.cf</tt>:
required_hits 4.0 #skip_rbl_checks 1 rewrite_header Subject *****SPAM***** #use_terse_report 1 add_header all DCC _DCCB_: _DCCR_ add_header all Pyzor _PYZOR_ add_header all Report _REPORT_ ok_locales en fr bayes_learn_to_journal 1 pyzor_path /usr/bin/pyzor dcc_home /var/dcc
Configure razor/pyzor/dcc:
ln -s /var/dcc/libexec/cron-dccd /etc/cron.daily/ sudo -u debian-spamd -s -H cd cdcc info pyzor discover razor-admin -create razor-admin -register
Check spamassassin for configuration errors:
sudo -u debian-spamd -H spamassassin --lint