You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Ed Kasky <ed...@esson.net> on 2010/01/27 23:28:46 UTC

Mysql Bayes not working with 3.3.0

I have been using Mysql for bayes storage for quite some time very 
successfully for quite some time.  After seeing a lot of spam coming 
through since upgrading I though I had better check the scoring to 
see what was going on.  Here's what I found:

Jan 27 10:16:27 yoda spamd[30357]: Issuing rollback() for database 
handle being DESTROY'd without explicit disconnect() at 
/usr/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/Plugin/Bayes.pm line 
1518, <GEN208> line 2.

I did some searching on the error but could not find anything related to SA.

Here are the lines in local.cf:

use_bayes 1
bayes_auto_learn 1
bayes_store_module                 Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn                      DBI:mysql:spam:localhost
bayes_sql_username                 spamd
bayes_sql_password                 ********

auto_whitelist_factory       Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn                 DBI:mysql:awl:localhost
user_awl_sql_username        spamd
user_awl_sql_password        *********

running a lint comes up clean - no warnings:

Jan 27 13:59:25.310 [29055] dbg: plugin: 
Mail::SpamAssassin::Plugin::Bayes=HASH(0xaa80cc0) implements 
'learner_new', priority 0
Jan 27 13:59:25.311 [29055] dbg: bayes: learner_new 
self=Mail::SpamAssassin::Plugin::Bayes=HASH(0xaa80cc0), 
bayes_store_module=Mail::SpamAssassin::BayesStore::MySQL
Jan 27 13:59:25.392 [29055] dbg: bayes: using username: ed
Jan 27 13:59:25.393 [29055] dbg: bayes: learner_new: got 
store=Mail::SpamAssassin::BayesStore::MySQL=HASH(0xa769678)
Jan 27 13:59:25.394 [29055] dbg: plugin: 
Mail::SpamAssassin::Plugin::Bayes=HASH(0xaa80cc0) implements 
'learner_is_scan_available', priority 0
Jan 27 13:59:25.408 [29055] dbg: bayes: database connection established
Jan 27 13:59:25.410 [29055] dbg: bayes: found bayes db version 3
Jan 27 13:59:25.412 [29055] dbg: bayes: Using userid: 3

I went through the install docs again but can't find anything wrong 
with my setup.  Any suggestions as to where else to look?

Thanks!

Ed Kasky
~~~~~~~~~
Randomly Generated Quote (1159 of 1230):
When I woke up this morning my wife asked me,
"Did you sleep good?"  I said, "No, I made a few mistakes."
--Steven Wright

Re: Mysql Bayes not working with 3.3.0

Posted by Ed Kasky <ed...@esson.net>.
At 03:37 PM Wednesday, 1/27/2010, Mark Martinec wrote -=>
>On Wednesday January 27 2010 23:28:46 Ed Kasky wrote:
> > I have been using Mysql for bayes storage for quite some time very
> > successfully for quite some time.  After seeing a lot of spam coming
> > through since upgrading I though I had better check the scoring to
> > see what was going on.  Here's what I found:
> >
> > Jan 27 10:16:27 yoda spamd[30357]: Issuing rollback() for database
> > handle being DESTROY'd without explicit disconnect() at
> > /usr/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/Plugin/Bayes.pm line
> > 1518, <GEN208> line 2.
> >
> > I did some searching on the error but could not find anything related
> > to SA.
> > bayes_store_module           Mail::SpamAssassin::BayesStore::MySQL
> > auto_whitelist_factory       Mail::SpamAssassin::SQLBasedAddrList
>
> > running a lint comes up clean - no warnings
>
> > I went through the install docs again but can't find anything wrong
> > with my setup.  Any suggestions as to where else to look?
>
>Assuming your database tables are of the type TYPE=InnoDB
>(as documented in ./sql/README.bayes) there does not appear to be
>anything unusual about your setup. I'm running a setup just like
>that (under amavisd and SpamAssassin 3.3.0, and bayes works
>fine with MySQL 5.1.42 .
>
>I suggest trying to reproduce the problem with a command-line
>spamassassin (with debugging enabled), and if that is not successful,
>turn on full debugging with spamd, then on hitting a problem
>examine back if there are any previous telltale signs leading
>to the problem.

After running spamd with -D switch, emails processed still generate 
just the one message:
Jan 27 17:36:49 yoda spamd[8719]: spamd: connection from localhost 
[127.0.0.1] at port 42825
Jan 27 17:36:49 yoda spamd[8719]: Issuing rollback() for database 
handle being DESTROY'd without explicit disconnect() at 
/usr/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/Plugin/Bayes.pm line 
1518, <GEN13> line 2.

Running a message through command line I see the following:

Jan 27 17:38:26.328 [8928] dbg: bayes: learner_new 
self=Mail::SpamAssassin::Plugin::Bayes=HASH(0xbbc8cc0), 
bayes_store_module=Mail::SpamAssassin::BayesStore::MySQL
Jan 27 17:38:26.369 [8928] dbg: bayes: using username: ed
Jan 27 17:38:26.370 [8928] dbg: bayes: learner_new: got 
store=Mail::SpamAssassin::BayesStore::MySQL=HASH(0xb8b1678)
Jan 27 17:38:26.371 [8928] dbg: plugin: 
Mail::SpamAssassin::Plugin::Bayes=HASH(0xbbc8cc0) implements 
'learner_is_scan_available', priority 0
Jan 27 17:38:26.381 [8928] dbg: bayes: database connection established
Jan 27 17:38:26.384 [8928] dbg: bayes: found bayes db version 3
Jan 27 17:38:26.385 [8928] dbg: bayes: Using userid: 3

I'm stumped...

...........................................................................

Randomly Generated Quote (1155 of 1582):
Several excuses are always less convincing than one.
-Aldous Huxley, novelist (1894-1963)


Re: Mysql Bayes not working with 3.3.0

Posted by Mark Martinec <Ma...@ijs.si>.
On Wednesday January 27 2010 23:28:46 Ed Kasky wrote:
> I have been using Mysql for bayes storage for quite some time very
> successfully for quite some time.  After seeing a lot of spam coming
> through since upgrading I though I had better check the scoring to
> see what was going on.  Here's what I found:
> 
> Jan 27 10:16:27 yoda spamd[30357]: Issuing rollback() for database
> handle being DESTROY'd without explicit disconnect() at
> /usr/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/Plugin/Bayes.pm line
> 1518, <GEN208> line 2.
> 
> I did some searching on the error but could not find anything related
> to SA.
> bayes_store_module           Mail::SpamAssassin::BayesStore::MySQL
> auto_whitelist_factory       Mail::SpamAssassin::SQLBasedAddrList

> running a lint comes up clean - no warnings

> I went through the install docs again but can't find anything wrong
> with my setup.  Any suggestions as to where else to look?

Assuming your database tables are of the type TYPE=InnoDB
(as documented in ./sql/README.bayes) there does not appear to be
anything unusual about your setup. I'm running a setup just like
that (under amavisd and SpamAssassin 3.3.0, and bayes works
fine with MySQL 5.1.42 .

I suggest trying to reproduce the problem with a command-line
spamassassin (with debugging enabled), and if that is not successful,
turn on full debugging with spamd, then on hitting a problem
examine back if there are any previous telltale signs leading
to the problem.

  Mark