SpamAssassins config options and sa-learn

Craig Daters craig at WESTPRESS.COM
Sun Feb 8 00:31:42 GMT 2004

I have installed MailWatch ( along side
of MailScanner with SpamAssassin using Sendmail as my MTA. I have also
created two user accounts ('spam', and 'notspam') for our employees to
send their email to teach SpamAssassin's Bayesian learning filter.
MailScanner, MailWatch, and SpamAssassin seem to be working great, and as
I am about to impliment the 'spam' and 'notspam' email option, I find
myself with some confusion....

Does MailScanner honor the SpamAssassin options that are set in
SpamAssassins '' file? Or does MailScanner instead only use the
options which are set in /etc/MailScanner/spam.assassin.prefs.conf. I
guess what I am asking is this, I want to add these options, but am
confused as to where to stick them:

use_bayes 1
bayes_path /etc/MailScanner/bayes
auto_learn 1
skip_rbl_checks 1
use_razor2 1
use_dcc 1
use_pyzor 0
dcc_add_header 1
dns_available yes
header LOCAL_RCVD Received =~ /\S+\.domain\.com\s+\(.*\[.*\]\)/
describe LOCAL_RCVD Received from local machine
score LOCAL_RCVD -50
## Optional Score Increases
score DCC_CHECK 4.000
score RAZOR2_CHECK 2.500
score BAYES_99 4.300
score BAYES_90 3.500
score BAYES_80 3.000

Finally, I want to set up a script and crontab that will force sa-learn to
learn from 'spam' and 'notspam', and in this case would I also use


if [ -e /var/mail/spam ]; then
/usr/bin/sa-learn --spam -p /etc/MailScanner/spam.assassin.prefs.conf
--mbox /var/mail/spam
rm /var/mail/spam > /dev/null

if [ -e /var/mail/notspam ]; then
/usr/bin/sa-learn --ham -p /etc/MailScanner/spam.assassin.prefs.conf
--mbox /var/mail/notspam
rm /var/mail/notspam > /dev/null

/usr/bin/sa-learn --rebuild -p /etc/MailScanner/spam.assassin.prefs.conf

Am I on the right track here?

Craig D.

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

More information about the MailScanner mailing list