this is obsolete doc -- see http://doc.nethence.com/ instead

Spamassassin system-wide configuration 

 

http://pbraun.nethence.com/doc/mail/spamassassin.html 

http://pbraun.nethence.com/doc/mail/procmail.html 

http://pbraun.nethence.com/doc/mail/milter_spamass-milter.html 

 

 

Introduction 

You can use spamassassin both ways: 

- with spamass-milter (http://pbraun.nethence.com/doc/mail/milter_spamass-milter.html) 

- with procmail (http://pbraun.nethence.com/doc/mail/procmail.html) 

 

 

Prerequesties 

On RHEL5 (spamassassin v3.2.5), 

rpm -q spamassassin

 

On NetBSD (spamassassin v3.3.1), 

pkg_info | grep spamassassin

 

 

System-wide configuration 

Configure Spamassassin system-wide. 

 

On RHEL5/6 (spamassassin 3.2.5 / 3.3.1), 

cd /etc/mail/spamassassin/

 

On NetBSD (spamassassin v3.3.1), 

cd /etc/
ln -s /usr/pkg/etc/spamassassin
cd /etc/spamassassin/

 

And proceed, 

mv local.cf local.cf.dist
cat > local.cf <<EOF9
report_safe             0
trusted_networks        127.0.0.1
required_score          5.0
use_bayes               0
bayes_auto_learn        0
skip_rbl_checks         0
use_razor2              0
use_dcc                 0
use_pyzor               0
ok_languages            all
ok_locales              all
EOF9

 

 

Daemon options 

Do not create user preferences files (disable -c and use -x). 

 

On RHEL5/6, 

cd /etc/sysconfig/
cp spamassassin spamassassin.dist
vi spamassassin

change, 

SPAMDOPTIONS="-d -x -m5"

Note. -d is NOT already included in package's init script 

 

On NetBSD, 

echo 'spamd_flags="-x -m5"' >> /etc/rc.conf

Note. default flags are "-H -c -d -r /var/run/spamd.pid" 

Note. -d is already included in package's init script 

 

Note. -d, --daemonize 

Note. -x, --nouser-config 

Note. -m number , --max-children=number 

Note. there's no need to even force a fake homedir with -H 

 

 

Ready to go 

Start and enable the daemon at boot. 

 

On RHEL5, 

service spamassassin restart
chkconfig spamassassin on

 

On NetBSD, 

cp /usr/pkg/share/examples/rc.d/spamd /etc/rc.d/
echo 'spamd=yes' >> /etc/rc.conf
/etc/rc.d/spamd restart

 

Check the daemon runs with the previously defined options, 

ps ax | grep spamd

 

 

Update the rules 

Update the spamassassin rules 

sa-update

and apply. On RHEL5, 

service spamassassin restart

on NetBSD, 

/etc/rc.d/spamd restart

Ref. http://wiki.apache.org/spamassassin/RuleUpdates 

 

 

Additional notes 

Note. we prefer not to rewrite the subject (not using rewrite_header or rewrite_subject+subject_tag) 

 

Note. score* here to permit asian and non-english language messages, 

score HTML_COMMENT_8BITS        0
score UPPERCASE_25_50           0
score UPPERCASE_50_75           0
score UPPERCASE_75_100          0
score OBSCURED_EMAIL            0
score SUBJ_ILLEGAL_CHARS        0

 

Note. what the freak? 

required_hits                   5

 

 

References 

On RHEL5, 

less /usr/share/doc/spamassassin-3.2.5/README

 

On NetBSD, 

less /usr/pkg/share/doc/spamassassin/spamd/README