You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Lindsay Haisley <fm...@fmp.com> on 2007/06/28 07:14:20 UTC

No Bayes!!

On Wed, 2007-06-27 at 22:24 -0500, Lindsay Haisley wrote:
> I just upgraded from SA 3.1.8-gr1 to SA 3.2.1-gr1 (Gentoo) and notice
> that I'm no longer getting any BAYES_NN test notices in my X-Spam-Status
> summary in my mail headers, or in the content analysis details in
> intercepted spam.  Under 3.1.8 I was getting Bayesian filter scores on
> everything since I'm well over the minimum required count of both spam
> and ham.  Is there something I need to do to turn this on?  I have all
> Bayes stuff in MySQL, and seem to remember someone else posting with a
> similar problem a while back with 3.2.0.
> 
> Where should I look for the answer to this?

Well I backed out to SA version 3.1.8 and I'm getting activity from my
Bayes filters again.  Maybe someone can give me some pointers on how to
debug this problem so I can get back up to v3.2.1.

-- 
Lindsay Haisley       | "In an open world,    |     PGP public key
FMP Computer Services |    who needs Windows  |      available at
512-259-1190          |      or Gates"        | http://pubkeys.fmp.com
http://www.fmp.com    |                       |


Re: No Bayes!!

Posted by Lindsay Haisley <fm...@fmp.com>.
On Thu, 2007-06-28 at 21:33 +0200, Mark Martinec wrote:
> > So what's the best fix for this?  Should one just freeze SA at an
> > earlier version on a production server until this is fixed upstream?
> > Is upstream aware of the problem and working on a fix for it?
> 
> Find out where the problem lies. When the component that needs fixing
> is known, then something can be done about it.

This is the cost of using F/OSS software, but the work will have to go
on hold until I have more time for it.  In the meantime, my question is
address specifically to John Thompson, Eray Aslan and anyone else who
may have had this problem and know more about it than I do.  If the SA
developers are aware of the problem and already working on it then my
own efforts might well be a waste of my time.  In the meantime I'm happy
to use an older version of SA which works just fine on my installation.

-- 
Lindsay Haisley       | "In an open world,    |     PGP public key
FMP Computer Services |    who needs Windows  |      available at
512-259-1190          |      or Gates"        | http://pubkeys.fmp.com
http://www.fmp.com    |                       |


Re: No Bayes!!

Posted by Mark Martinec <Ma...@ijs.si>.
> So what's the best fix for this?  Should one just freeze SA at an
> earlier version on a production server until this is fixed upstream?
> Is upstream aware of the problem and working on a fix for it?

Find out where the problem lies. When the component that needs fixing
is known, then something can be done about it.

  Mark

Re: No Bayes!! - found it!

Posted by Lindsay Haisley <fm...@fmp.com>.
Apparently SA 3.2.1 is more finicky than 3.1.8 about the user the daemon
runs as.  If no -u option is given to spamd when it starts, then its
child processes run as root, which works, but the bayes module won't
cooperate.  If a spamd child is running as root, the bayes filter uses
the user spec'd to "spamc -u", but before it reports, spamd falls back
to running as a non-priv user (in my case 'nobody'), the bayes scanner
re-runs as user 'nobody' and it finds nothing.  If I start spamd with
"-u nobody", the spamd children run as this user and the bayes filter
runs happily and reports a usable score based on the bayes tokens
recorded for the user spec'd to spamc.

So this _was_ a configuration error, but one that was the result of
tightened security between SA 3.1.8 and 3.2.1.

Thanks to everyone who responded on this!  Running spamd with -D and
looking at my log files produced the answer.

-- 
Lindsay Haisley       | "In an open world,    |     PGP public key
FMP Computer Services |    who needs Windows  |      available at
512-259-1190          |      or Gates"        | http://pubkeys.fmp.com
http://www.fmp.com    |                       |


Re: No Bayes!!

Posted by Lindsay Haisley <fm...@fmp.com>.
On Thu, 2007-06-28 at 16:32 -0500, Michael Parker wrote:
> I can't recall a bug open for anything like this.  Please visit
> http://issues.apache.org/SpamAssassin/ and file a complete bug report.
> Please describe the exact problem you are seeing as well as full debug
> output.  A random thread on the users list won't necessarily get
> developers attention.

I'm currently doing what Eray Aslan suggested and backversioning MySQL
to 5.0.40 and upversioning to SA 3.2.1-r1 and I'll see if the problem
persists there.  That'll tell a lot.  I'll then upgrade MySQL again and
see if that makes any difference.

> The developers are not aware of such a problem, best bet is to make them
> aware.

I'll see what I can do.

> I myself have been using Bayes SQL longer than anyone and have had no
> problems recently upgrading from 3.1.8 to 3.2.  Also, the Bayes code has
> been very stable, with little to no changes over the last few releases,
> especially in the storage code, so its likely a config or environment issue.
> 
> Without proper debugging it will be hard to tell what exactly is the cause.

Well my original post asked for some suggestions on how best to do this,
so specific suggestions will be welcome.

-- 
Lindsay Haisley       | "In an open world,    |     PGP public key
FMP Computer Services |    who needs Windows  |      available at
512-259-1190          |      or Gates"        | http://pubkeys.fmp.com
http://www.fmp.com    |                       |


Re: No Bayes!!

Posted by Michael Parker <pa...@pobox.com>.
Lindsay Haisley wrote:
> On Thu, 2007-06-28 at 15:43 -0400, Theo Van Dinter wrote:
>> On Thu, Jun 28, 2007 at 02:27:36PM -0500, Lindsay Haisley wrote:
>>> So what's the best fix for this?  Should one just freeze SA at an
>>> earlier version on a production server until this is fixed upstream?  Is
>>> upstream aware of the problem and working on a fix for it?
>> You need to debug your installation and figure out what the problem is.  Bayes
>> works fine in 3.2.  
> 
> Obvously, for some of us, it doesn't.  I can take the time to determine
> the conditions that cause the failure, but I don't have a lot of time to
> work on debugging this kind if thing if my installation works fine with
> an earlier version of SA.  If the developers upstream are aware of the
> problem and working on it, then any debugging I might do would very
> likely be a waste of my time - hence my question.

I can't recall a bug open for anything like this.  Please visit
http://issues.apache.org/SpamAssassin/ and file a complete bug report.
Please describe the exact problem you are seeing as well as full debug
output.  A random thread on the users list won't necessarily get
developers attention.

The developers are not aware of such a problem, best bet is to make them
aware.

I myself have been using Bayes SQL longer than anyone and have had no
problems recently upgrading from 3.1.8 to 3.2.  Also, the Bayes code has
been very stable, with little to no changes over the last few releases,
especially in the storage code, so its likely a config or environment issue.

Without proper debugging it will be hard to tell what exactly is the cause.


Michael

Re: No Bayes!!

Posted by Lindsay Haisley <fm...@fmp.com>.
On Thu, 2007-06-28 at 15:43 -0400, Theo Van Dinter wrote:
> On Thu, Jun 28, 2007 at 02:27:36PM -0500, Lindsay Haisley wrote:
> > So what's the best fix for this?  Should one just freeze SA at an
> > earlier version on a production server until this is fixed upstream?  Is
> > upstream aware of the problem and working on a fix for it?
> 
> You need to debug your installation and figure out what the problem is.  Bayes
> works fine in 3.2.  

Obvously, for some of us, it doesn't.  I can take the time to determine
the conditions that cause the failure, but I don't have a lot of time to
work on debugging this kind if thing if my installation works fine with
an earlier version of SA.  If the developers upstream are aware of the
problem and working on it, then any debugging I might do would very
likely be a waste of my time - hence my question.

> As for "on a production server" -- you do some testing
> before doing a major upgrade in "production", right?  :)

SpamAssassin itself is only in beta as far as its use for my customers.
I'm not going to deploy it for everyone on my servers until problems
such as this are addressed.

> Start by running a message through "spamassassin -D" and see what is going on.

I'm not using spamassassin, I'm using spamd/spamc.  spamc takes a -u
option and gets passed the email address of a virtual mail user by the
MDA.  the 'spamassassin' executable takes no such option.  On top of
that, there's no documentation re. getting the 'spamassassin' executable
to read per-user Bayes data and userprefs from a MySQL database (as
there is for spamd) and my understanding is that it probably won't.  I
could be wrong in this, and would be happy to be educated about it.

> Do you have config errors?  Not loading the Bayes plugin?  Bayes can't access
> the DB?  Not enough tokens to make Bayes usable?  Debug mode helps answer all
> of these questions, and more.

As I stated in my original post, there are plenty of stored Bayes tokens
to get reliable Bayes scores.  The _only_ change in the setup here was
upgrading the SpamAssassin verision, and backversioning solved the
problem, which probably rules out a configuration problem.

Please re-read my original post and the follow-up posts by Eray Aslan
and John Thompson which indicate that this is probably a bug, not a
configuration issue.

-- 
Lindsay Haisley       | "In an open world,    |     PGP public key
FMP Computer Services |    who needs Windows  |      available at
512-259-1190          |      or Gates"        | http://pubkeys.fmp.com
http://www.fmp.com    |                       |


Re: No Bayes!!

Posted by Theo Van Dinter <fe...@apache.org>.
On Thu, Jun 28, 2007 at 02:27:36PM -0500, Lindsay Haisley wrote:
> So what's the best fix for this?  Should one just freeze SA at an
> earlier version on a production server until this is fixed upstream?  Is
> upstream aware of the problem and working on a fix for it?

You need to debug your installation and figure out what the problem is.  Bayes
works fine in 3.2.  As for "on a production server" -- you do some testing
before doing a major upgrade in "production", right?  :)

Start by running a message through "spamassassin -D" and see what is going on.

Do you have config errors?  Not loading the Bayes plugin?  Bayes can't access
the DB?  Not enough tokens to make Bayes usable?  Debug mode helps answer all
of these questions, and more.

-- 
Randomly Selected Tagline:
"It's been a few years since I really looked at NFS, so you can slap
 me w/a trout if this is wrong. :-)"     - John Eisenmenger

Re: No Bayes!!

Posted by Lindsay Haisley <fm...@fmp.com>.
So what's the best fix for this?  Should one just freeze SA at an
earlier version on a production server until this is fixed upstream?  Is
upstream aware of the problem and working on a fix for it?

On Thu, 2007-06-28 at 13:51 -0500, John Thompson wrote:
> Eray Aslan wrote:
> > On 28.06.2007 08:14, Lindsay Haisley wrote:
> >> On Wed, 2007-06-27 at 22:24 -0500, Lindsay Haisley wrote:
> >>> I just upgraded from SA 3.1.8-gr1 to SA 3.2.1-gr1 (Gentoo) and notice
> >>> that I'm no longer getting any BAYES_NN test notices in my X-Spam-Status
> >>> summary in my mail headers, or in the content analysis details in
> >>> intercepted spam. 
> 
> >> Well I backed out to SA version 3.1.8 and I'm getting activity from my
> >> Bayes filters again.  Maybe someone can give me some pointers on how to
> >> debug this problem so I can get back up to v3.2.1.
> 
> > Probably a gentoo bug.  I've run into the same problem.  Downgrading
> > mysql from 5.0.42 to 5.0.40 solved the problem for me.  In other words,
> > SA 3.2.1 and mysql 5.0.42 resulted in no BAYES scores.  SA 3.2.1 and
> > mysql 5.0.40 works as expected.
> 
> I'm not sure this is limited to gentoo. I'm missing BAYES_?? checks
> since updating to 3.2.1 from the FreeBSD ports collection.
> 
-- 
Lindsay Haisley       |  "We are all broken  |     PGP public key
FMP Computer Services |   toasters, but we   |      available at
512-259-1190          | still manage to make |<http://pubkeys.fmp.com>
http://www.fmp.com    |        toast"        |
                      |    (Cheryl Dehut)    |



Re: No Bayes!!

Posted by John Thompson <Jo...@new.rr.com>.
Eray Aslan wrote:
> On 28.06.2007 08:14, Lindsay Haisley wrote:
>> On Wed, 2007-06-27 at 22:24 -0500, Lindsay Haisley wrote:
>>> I just upgraded from SA 3.1.8-gr1 to SA 3.2.1-gr1 (Gentoo) and notice
>>> that I'm no longer getting any BAYES_NN test notices in my X-Spam-Status
>>> summary in my mail headers, or in the content analysis details in
>>> intercepted spam. 

>> Well I backed out to SA version 3.1.8 and I'm getting activity from my
>> Bayes filters again.  Maybe someone can give me some pointers on how to
>> debug this problem so I can get back up to v3.2.1.

> Probably a gentoo bug.  I've run into the same problem.  Downgrading
> mysql from 5.0.42 to 5.0.40 solved the problem for me.  In other words,
> SA 3.2.1 and mysql 5.0.42 resulted in no BAYES scores.  SA 3.2.1 and
> mysql 5.0.40 works as expected.

I'm not sure this is limited to gentoo. I'm missing BAYES_?? checks
since updating to 3.2.1 from the FreeBSD ports collection.

-- 

-John Thompson (john@os2.dhs.org)
 Appleton WI USA

Re: No Bayes!!

Posted by Eray Aslan <er...@caf.com.tr>.
On 28.06.2007 08:14, Lindsay Haisley wrote:
> On Wed, 2007-06-27 at 22:24 -0500, Lindsay Haisley wrote:
>> I just upgraded from SA 3.1.8-gr1 to SA 3.2.1-gr1 (Gentoo) and notice
>> that I'm no longer getting any BAYES_NN test notices in my X-Spam-Status
>> summary in my mail headers, or in the content analysis details in
>> intercepted spam.  Under 3.1.8 I was getting Bayesian filter scores on
>> everything since I'm well over the minimum required count of both spam
>> and ham.  Is there something I need to do to turn this on?  I have all
>> Bayes stuff in MySQL, and seem to remember someone else posting with a
>> similar problem a while back with 3.2.0.
>>
>> Where should I look for the answer to this?
> 
> Well I backed out to SA version 3.1.8 and I'm getting activity from my
> Bayes filters again.  Maybe someone can give me some pointers on how to
> debug this problem so I can get back up to v3.2.1.

Probably a gentoo bug.  I've run into the same problem.  Downgrading
mysql from 5.0.42 to 5.0.40 solved the problem for me.  In other words,
SA 3.2.1 and mysql 5.0.42 resulted in no BAYES scores.  SA 3.2.1 and
mysql 5.0.40 works as expected.

http://article.gmane.org/gmane.mail.spam.spamassassin.general/99750/match=bayes+returning+undef
was my problem report.

Hope it helps.

-- 
Eray