Page 1 of 1

Bayes Database has been erased

Posted: 12 Mar 2010, 15:41
by hilario
I used to have a very large bayes database, but today I noticed that it has been wiped off.

Questions:
1) Which are the directories that must be backed-up to recover the Bayes database in such circumstances?

2) What could possibly have wiped it? Is there settings in Mailscanner or MSFE that could have done it? Scripts that run or could be reset by a MSFE update?

3) Are there any logs where I could check to see when that occurred?

Thanks,

Hilário

Posted: 29 Mar 2010, 10:28
by Sarah
1) The bayes database is stored in /var/spool/mqueue/.spamassassin/

2) I am not aware of any script or MailScanner settings that could have deleted the bayes database without any user input. None of our scripts would delete it. It is Spamassassin that rebuilds, syncs, etc. the bayes database. Is it possible that at some point the /var/ partition became full or nearly full?

3) I think /var/log/maillog would be the place to check.

Regards,
Sarah

Posted: 29 Mar 2010, 18:02
by hilario
I checked the location indicated and found the three following files:
bayes.mutex 6.192 bytes
bayes_seen 4.968.448 bytes
bayes_toks 41.095.168 bytes

But the file bayes_journal does not exist any more.
The dates on the files are current date.

Altought the files are very large, Mailwatch reports that Number of Tokens is only 3,045
with 22 spam messages and 970 ham messages.

Questions:
1) May it be related to the absence of the bayes_journal file?
2) Is there a way to recover / rebuild it?
3) Are there any parameters in Mailscanner that could affect these files?

Thanks,

Hilário

Posted: 02 Apr 2010, 15:05
by Sarah
1) You could try using "sa-learn --sync". Do "sa-learn --help" first to find out what options there are and what each option does.

2) Only if you have a backup. If the above doesn't work, you'll probably have to delete it and start over from scratch.

3) Only if you have configured bayes expiry to be done within MailScanner rather than SpamAssassin as outlined in this FAQ:
http://www.configserver.com/techfaq/index.php?faqid=77

That FAQ also tells you how to remove the database to start over.

Regards,
Sarah