Bayes - No auto learn?

Pete Russell pete at EATATHOME.COM.AU
Tue Nov 11 22:24:56 GMT 2003

Thanks Steve - even though it wont use until it has learned, it should be
learning? Whihc is doesnt appear to be.

Steve, just read Kevin's reply below, and as i have just gotton the
permissions right to work with MailWatch, how will Keven suggestions affect
this? I dont fix one and break another and end up in a endless loop -
precisely what dir and file permissions on the bays dir and bayes files will
work with both mailwatch and mailscanner?

I am reluctant to keep makiung changes here, untill i know what will or wont

I think i better sync my backup server and do the rest on this, before i
break something


-----Original Message-----
From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK]On
Behalf Of Steve Freegard
Sent: Wednesday, 12 November 2003 9:09 AM
Subject: Re: Bayes - No auto learn?

Hi Pete,

Couple of things:

SpamAssassin won't use bayes until it has learnt exactly 200 spam and 200
ham messages - you can test to see if SpamAssassin is using bayes by

spamassassin -D -p /etc/MailScanner/spam.assassin.prefs.conf --lint 2>&1 |

And see if it runs the Bayes tests and lists the tokens and probabilities.

Secondly - you won't see any BAYES_* tests in the log or MailWatch for
messages that score 40,44,50 or 56% probabilities unless you add the
following to spam.assassin.prefs.conf:

score BAYES_40 0 0 0.001 0.001
score BAYES_44 0 0 0.001 0.001
score BAYES_50 0 0 0.001 0.001
score BAYES_56 0 0 0.001 0.001

Hope this helps.

Kind regards,

-----Original Message-----
From: Pete Russell <pete at EATATHOME.COM.AU>
Sent: Tue Nov 11 21:49:25 2003
Subject: Bayes - No auto learn?

I am using postfix, RH9, MS 4.25.5

I have finally set up bayes, so that MailWatch can learn individual messages
(how nice would it be to be able to select all on the quarantine page?), i
have changed the path in /root/.spamassassin/user_prefs to use the
MailScaner bayes dir, (same as path in /etc/MailScanner/spam.assassin.prefs)
/var/spool/MailScanner/spamassassin/bayes (without the _ on the end)

So now if i do sa-learn-dump magic i get the same result as
sa-learn --prefs-file=/etc/MailScanner/spamassassin.prefs

But none of my scores include any reference to bayes, and the bayes does not
appear in the maillog at all. The values of sa-learn --dump have not changed
at all after 400+ messages have passed through my scanner.

I can manually, using the command line, learn quarantine messages.

I have use_bayes 1 at the end of the prefs file.

I ahve restarted MailScanner after making any changes.

the bayes dir have the following properties (the extra _ in the first 2 is
because i had incorrectly added it in spam.assassin.prefs, and since removed

[root at mail01 root]# ls -al /var/spool/MailScanner/spamassassin/
total 636
drwxrwsr-x    2 root     apache       4096 Nov 12 00:11 .
drwxr-xr-x    5 root     root         4096 Nov 11 15:37 ..
-rw-rw----    1 apache   apache      12288 Nov 11 23:25 bayes__seen
-rw-rw----    1 apache   apache      24576 Nov 11 23:25 bayes__toks
-rwxrwx---    1 root     apache      45056 Nov 12 00:11 bayes_seen
-rwxrwx---    1 root     apache     651264 Nov 12 00:11 bayes_toks

What else must i do for MailScanner to use bayes automatically?

kind regards and thanks

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender and delete the message from your mailbox.

This footnote also confirms that this email message has been swept by
MailScanner ( for the presence of computer viruses.

More information about the MailScanner mailing list