You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Mike Keller <mi...@ohioindemnity.com> on 2005/11/09 23:43:33 UTC

Bayes MySQL question

Hello, I have SA 3.1.0 configured to use MySQL (4.0.24), running on
OpenBSD 3.8 for bayes data.  I am able to import spam and ham into the
DB using sa-learn, but in my bayes_vars table, I don't have anything for
token_count.  My spam_count is 421 and my ham_count is 400.  I do have
821 records in my bayes_seen table, but my bayes_token table is empty.
I used the schema located at
http://spamassassin.apache.org/full/3.1.x/dist/sql/bayes_mysql.sql to
create my database.  When I run sa-learn -D everything looks fine, other
than token count:0

[24509] dbg: bayes: using username: spamassassin [24509] dbg: bayes:
database connection established [24509] dbg: bayes: found bayes db
version 3 [24509] dbg: bayes: Using userid: 1 [24509] dbg: config: score
set 3 chosen.
[24509] dbg: learn: initializing learner [24509] dbg: bayes: bayes
journal sync starting [24509] dbg: bayes: bayes journal sync completed
[24509] dbg: bayes: expiry starting [24509] dbg: bayes: expiry check
keep size, 0.75 * max: 112500 [24509] dbg: bayes: token count: 0, final
goal reduction size: -112500 [24509] dbg: bayes: reduction goal of
-112500 is under 1,000 tokens, skipping expire [24509] dbg: bayes:
expiry completed

Here is the bayes pertinent info from:
spamassassin -x -D -p /etc/mail/spamassassin/local.cf --lint

[3377] dbg: bayes: using username: spamassassin [3377] dbg: bayes:
database connection established [3377] dbg: bayes: found bayes db
version 3 [3377] dbg: bayes: Using userid: 1 [3377] dbg: bayes: corpus
size: nspam = 421, nham = 400 [3377] dbg: bayes: tok_get_all: token
count: 20 [3377] dbg: bayes: cannot use bayes on this message; none of
the tokens were found in the database

Output from sa-learn --dump
     
0.000          0          3          0  non-token data: bayes db version
0.000          0        421          0  non-token data: nspam
0.000          0        400          0  non-token data: nham
0.000          0          0          0  non-token data: ntokens
0.000          0 2147483647          0  non-token data: oldest atime
0.000          0          0          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal
sync atime
0.000          0 1131571809          0  non-token data: last expiry
atime
0.000          0          0          0  non-token data: last expire
atime delta
0.000          0          0          0  non-token data: last expire
reduction count

Bayes info from my local.cf:

bayes_store_module      Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn           DBI:mysql:spamassassin:localhost
bayes_sql_username      someuser
bayes_sql_password      somepassword
use_bayes               1
bayes_sql_override_username spamassassin bayes_auto_expire 1
bayes_auto_learn  1

All necessary perl modules are installed.

Everything else works perfectly.  Anyone have any ideas?
CONFIDENTIALITY NOTICE: E-mail is not considered a secure mechanism for data transmission, and should not be viewed as such.  This message is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply e-mail or telephone and destroy all copies of the original message.

Re: Bayes MySQL question

Posted by Michael Parker <pa...@pobox.com>.
Mike Keller wrote:
> Hello, I have SA 3.1.0 configured to use MySQL (4.0.24), running on

You need to use at least MySQL 4.1.x to use the 
Mail::SpamAssassin::BayesStore::MySQL storage engine.

Michael