Bayes DB Reminder

Discuss our MailScanner install script and MailScanner itself
Post Reply
kemis
Junior Member
Posts: 9
Joined: 22 Jan 2008, 20:13

Bayes DB Reminder

Post by kemis »

My bayes rules stopped processing a couple days ago & I need a reminder as to how this could happen when I have my bayes rebuild setting set to zero.

Assuming my db was corrupt or something, how long does it take to get a DB built back up where bayes rules kick into gear again? What is the general rule of thumb?

My SA Lint report is clean, and here's by Bayes Stats from MailWatch, in case it helps. If they look like my rules should be processing, then I might have a real problem...

Thanks,
Matt
-------------
Number of Spam Messages: 2,194,782
Number of Ham Messages: 188,155
Number of Tokens: 139,341
Oldest Token: Thu, 17 Jul 2008 10:06:54 -0500
Newest Token: Sat, 19 Jul 2008 09:43:45 -0500
Last Journal Sync: Sat, 19 Jul 2008 09:44:48 -0500
Last Expiry: Thu, 17 Jul 2008 22:09:40 -0500
Last Expiry Reduction Count: 1,359,646 tokens
kemis
Junior Member
Posts: 9
Joined: 22 Jan 2008, 20:13

Post by kemis »

Okay, so I finally decided to just whack my entire bayes_* db files & start over. It's been running overnight & this is my new database info as reported by MailWatch:

Number of Spam Messages: 2,436
Number of Ham Messages: 113
Number of Tokens: 112,889
Oldest Token: Tue, 22 Jul 2008 23:02:40 -0500
Newest Token: Wed, 23 Jul 2008 09:01:08 -0500
Last Journal Sync: Wed, 31 Dec 1969 18:00:00 -0600
Last Expiry: Wed, 31 Dec 1969 18:00:00 -0600
Last Expiry Reduction Count: 0 tokens

The Big Question: At what point will my BAYES_XX rules kick in again? What's the algorithm for this? I can't seem to find a definitive answer via Google...

Thanks,
Matt
kemis
Junior Member
Posts: 9
Joined: 22 Jan 2008, 20:13

Post by kemis »

In case it helps anyone else, my BAYES rules kicked in sometime during the day today after wiping the DB files last night.

Here are the current DB info stats from MailWatch for reference to the stats above where it hadn't kicked in yet.

Number of Spam Messages: 4,419
Number of Ham Messages: 514
Number of Tokens: 211,368
Oldest Token: Tue, 22 Jul 2008 23:30:13 -0500
Newest Token: Wed, 23 Jul 2008 17:29:11 -0500
Last Journal Sync: Wed, 23 Jul 2008 17:20:19 -0500
Last Expiry: Wed, 23 Jul 2008 11:30:27 -0500
Last Expiry Reduction Count: 3,365 tokens

I'm hoping resetting the DB fixes some SA timeouts I've been having recently. My assumption is that my 300MB bayes db wasn't making for a speedy SA process.

Matt
Sarah
Moderator
Posts: 923
Joined: 09 Dec 2006, 22:49

Post by Sarah »

Hi Matt,

Bayes will kick in after 200 (of each) spam and ham messages have been learned.

You can often get some idea where SpamAssassin is hanging by saving a spam message (including all headers) in a text file (say, spam.txt) and then running the following command in the directory where you saved the file:

spamassassin -t -D < spam.txt

Watch the output and see where it pauses. The most common issues are DNS lookups and Bayes.

Sarah
Post Reply