You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Duane Hill <d....@yournetplus.com> on 2005/12/15 16:40:15 UTC
Bayes and MySQL
Hello All,
I'm running SpamAssassin v3.1.0 on a Win2K server through a plugin
for our MTA. It is working and has been working just fine. I decided
to make an attempt at getting the bayes stored in a MySQL database
because of the increased CPU load with using DB_File. I have
successfully installed and configured MySQL, added a user for
SpamAssassin, created a schema for the SpamAssassin tables and given
all access to the schema for the SpamAssassin user account (for
now). I also added the following lines to my local.cf:
bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn DBI:mysql:spamassassin:localhost:3306
bayes_sql_username the_user_name
bayes_sql_password the_pass_word
Here is the error I'm receiving when doing a test via:
spamassassin -D -t < testspam.txt > testspam.out
[2068] dbg: bayes: database connection established
[2068] dbg: bayes: found bayes db version 3
[2068] dbg: bayes: unable to initialize database for unknown user, aborting!
[2068] dbg: bayes: not scoring message, returning undef
[2068] dbg: bayes: opportunistic call attempt failed, DB not readable
Maybe there is something so simple that I am overlooking... Thanks for
any help that can be offered.
--
"This message is made of 100% recycled electrons."
Re: Bayes and MySQL
Posted by Duane Hill <d....@yournetplus.com>.
On Thursday, December 15, 2005 at 5:23:06 PM, linux@matthias-keller.ch confabulated:
> Duane Hill wrote:
>>Hello All,
>>
>> I'm running SpamAssassin v3.1.0 on a Win2K server through a plugin
>> for our MTA. It is working and has been working just fine. I decided
>> to make an attempt at getting the bayes stored in a MySQL database
>> because of the increased CPU load with using DB_File. I have
>> successfully installed and configured MySQL, added a user for
>> SpamAssassin, created a schema for the SpamAssassin tables and given
>> all access to the schema for the SpamAssassin user account (for
>> now). I also added the following lines to my local.cf:
>>
>> bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
>> bayes_sql_dsn DBI:mysql:spamassassin:localhost:3306
>> bayes_sql_username the_user_name
>> bayes_sql_password the_pass_word
>>
>> Here is the error I'm receiving when doing a test via:
>>
>> spamassassin -D -t < testspam.txt > testspam.out
>>
>>[2068] dbg: bayes: database connection established
>>[2068] dbg: bayes: found bayes db version 3
>>[2068] dbg: bayes: unable to initialize database for unknown user, aborting!
>>[2068] dbg: bayes: not scoring message, returning undef
>>[2068] dbg: bayes: opportunistic call attempt failed, DB not readable
>>
>>Maybe there is something so simple that I am overlooking... Thanks for
>>any help that can be offered.
>>
>>
> Hi
> This error occured in my setup too until i learned the first message..
> it worked from there.
> Try learning a message and it probalby will work
Matt, an absolute brilliance! I did just that and it is now learning
bayes into MySQL! Now, onward to bigger things.
Thanks again!
--
"This message is made of 100% recycled electrons."
Re: Bayes and MySQL
Posted by Matthias Keller <li...@matthias-keller.ch>.
Duane Hill wrote:
>Hello All,
>
> I'm running SpamAssassin v3.1.0 on a Win2K server through a plugin
> for our MTA. It is working and has been working just fine. I decided
> to make an attempt at getting the bayes stored in a MySQL database
> because of the increased CPU load with using DB_File. I have
> successfully installed and configured MySQL, added a user for
> SpamAssassin, created a schema for the SpamAssassin tables and given
> all access to the schema for the SpamAssassin user account (for
> now). I also added the following lines to my local.cf:
>
> bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
> bayes_sql_dsn DBI:mysql:spamassassin:localhost:3306
> bayes_sql_username the_user_name
> bayes_sql_password the_pass_word
>
> Here is the error I'm receiving when doing a test via:
>
> spamassassin -D -t < testspam.txt > testspam.out
>
>[2068] dbg: bayes: database connection established
>[2068] dbg: bayes: found bayes db version 3
>[2068] dbg: bayes: unable to initialize database for unknown user, aborting!
>[2068] dbg: bayes: not scoring message, returning undef
>[2068] dbg: bayes: opportunistic call attempt failed, DB not readable
>
>Maybe there is something so simple that I am overlooking... Thanks for
>any help that can be offered.
>
>
Hi
This error occured in my setup too until i learned the first message..
it worked from there.
Try learning a message and it probalby will work
Matt
Re: Bayes and MySQL
Posted by Kai Schaetzl <ma...@conactive.com>.
Duane Hill wrote on Thu, 15 Dec 2005 15:40:15 +0000:
> [2068] dbg: bayes: unable to initialize database for unknown user, aborting!
First, make sure that your SA user exists by logging in with mysql command. If
that is successful, I think SA may be using a different user. I don't know how
your plugin works, when you run SA from command line it may use a different
user then what you configured in local.cf.
Kai
--
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com