You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Dave Augustus <da...@ingraftedsoftware.com> on 2006/11/28 00:51:00 UTC

Why no bayes?

I NEVER get any bayes_?? in my headers

Why?

Running:
Amavisd-new
spamassassin-3.1.7
amavisd-new-2.4

I am storing bayes in SQL as I need it available for more than one
server.

"sa-learn --dump magic" shows: 

0.000          0          3          0  non-token data: bayes db version
0.000          0      10950          0  non-token data: nspam
0.000          0      40395          0  non-token data: nham
0.000          0     120716          0  non-token data: ntokens
0.000          0 1130788224          0  non-token data: oldest atime
0.000          0 1131330249          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal
sync atime
0.000          0 1143487659          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


Thanks,
Dave


Re: Why no bayes?

Posted by Theo Van Dinter <fe...@apache.org>.
On Mon, Nov 27, 2006 at 04:51:51PM -0800, Evan Dorn wrote:
> command line without problem.   I've had this problem for six months,  
> and don't even know what tools to use to start debugging it with.

-D ?

-- 
Randomly Selected Tagline:
"We are used to a deep-rooted Arab tradition of democracy where results
 are first declared, then elections are conducted and votes brought in
 to affirm it." - Talal Salman, editor of the As-Safir newspaper in Lebanon

Re: Why no bayes?

Posted by Evan Dorn <pu...@idahoev.com>.
On Nov 27, 2006, at 3:51 PM, Dave Augustus wrote:

> I NEVER get any bayes_?? in my headers

I have a similar problem running SA in my user accounts on a  
commercial server.   I have SA 3.1.1 installed on 3 different  
accounts, accessing the same MySQL Bayes DB.

I get bayes_?? headers in email sent to one of the two accounts, but  
NOT the other two.

I cannot figure out what the difference is, as the config files are  
bytewise identical and all three accounts can access the DB from the  
command line without problem.   I've had this problem for six months,  
and don't even know what tools to use to start debugging it with.

SA version 3.1.1
installed in ~/sausr and ~/saetc

Evan


Re: Why no bayes? [FIXED]

Posted by Dave Augustus <da...@ingraftedsoftware.com>.
YMMV- I am not sure the *proper* way to do this (but I am glad there is
no registry- :) ).

Here ya go!

find /usr/lib/per5 -name SpamAssassin.pm

I have deleted mine but you should have 2 listings:

/usr/lib/perl5/site-perl/5.8.5/Mail/SpamAssassin.pm
/usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm

The site-perl is, I believe, is the location where cpan installs. I can
confirm this by doing the following

find where the rpm installs to:
rpm -q spamassassin -l|grep SpamAssassin.pm

result:
/usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm


The location should be one of those 2 entries and THAT is the one you
want to keep. 

I then, for safety's sake, moved the non-rpm version, located at 
/usr/lib/perl5/site-perl/5.8.5/Mail

mv /usr/lib/perl5/site-perl/5.8.5/Mail /root/spamassassin_Mail

Finally, running "/usr/sbin/amavisd -d bayes debug-sa" as user amavis
and should so no errors about version mismatches. There may be other
errors particular to your installation. I got some based on specific
rules not having something but nothing about entire CF files not being
used.

If there is a better PERL way of doing this, I would appreciate anything
offered in that regard.

BTW- I think that this happened because a yum dependancy wasn't
available via yum so I used CPAN(site-perl) to meet the dependancy.
Later, yum got the dependancy and installed it into vendor-perl.


Hope it helps!

Dave Augustus

On Tue, 2006-11-28 at 19:27 -0800, Quinn Comendant wrote:
> How did you uninstall the cpan version? Just for the hell of it I ran the same test you did and I also have two versions installed (although my SA is running fine). I should uninstall the unused version, no?
> 
> Quinn
> 
> On Tue, 28 Nov 2006 14:53:49 -0600, Dave Augustus wrote:
> > TADA! 2 installs- the one in site-perl must have come from cpan.


Re: Why no bayes? [FIXED]

Posted by Quinn Comendant <qu...@strangecode.com>.
How did you uninstall the cpan version? Just for the hell of it I ran the same test you did and I also have two versions installed (although my SA is running fine). I should uninstall the unused version, no?

Quinn

On Tue, 28 Nov 2006 14:53:49 -0600, Dave Augustus wrote:
> TADA! 2 installs- the one in site-perl must have come from cpan.

Re: Why no bayes? [FIXED]

Posted by Dave Augustus <da...@ingraftedsoftware.com>.
Yes!!

Here is a sample header from an email my coworker received:

X-Spam-Status: No, score=2.419 tagged_above=0.5 required=5 tests=
[AWL=-1.082, BAYES_99=3.5, HTML_MESSAGE=0.001]

Notice the BAYES entry!

Thanks to everyone who helped me on this. I hope it helps others.

Dave


On Tue, 2006-11-28 at 14:53 -0600, Dave Augustus wrote:
> I found 2 versions of SpamAssassin installed:
> 
> /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin
> /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin
> 
> To find out who owned what, I did:
> 
> rpm -q -f /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin.pm
> 
> which said :
> file /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin.pm is not owned by
> any package
> 
> Then I did: 
> rpm -q -f /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm
> 
> which said:
> spamassassin-3.1.7-1.el4.rf
> 
> TADA! 2 installs- the one in site-perl must have come from cpan.
> 
> Hopefully this will allow me to see the bayes rules again as I did
> "/usr/sbin/amavisd -d bayes debug-sa" as user amavis and got not errors
> about version mismatches.
> 
> I should see the results shortly.
> 
> Thanks for your help!
> 
> Dave
> 
> On Tue, 2006-11-28 at 14:39 -0500, Theo Van Dinter wrote:
> > On Tue, Nov 28, 2006 at 01:35:02PM -0600, Dave Augustus wrote:
> > > config: configuration file "/usr/share/spamassassin/23_bayes.cf"
> > > requires version 3.001007 of SpamAssassin, but this is code version
> > > 3.001001. Maybe you need to use the -C switch, or remove the old config
> > > 
> > > So my rpm -qa|grep spam lists:
> > > spamassassin-3.1.7-1.el4.rf
> > > 
> > > Why would it error out on files that came with it?
> > 
> > You're making a number of assumptions in that statement, some of which are
> > false.  The short version is that your rules are from 3.1.7, but you're
> > running the 3.1.1 perl modules.  Fix your install and you should be ok.
> > 
> 


Re: Why no bayes? [FIXED]

Posted by Dave Augustus <da...@ingraftedsoftware.com>.
I found 2 versions of SpamAssassin installed:

/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin
/usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin

To find out who owned what, I did:

rpm -q -f /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin.pm

which said :
file /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin.pm is not owned by
any package

Then I did: 
rpm -q -f /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm

which said:
spamassassin-3.1.7-1.el4.rf

TADA! 2 installs- the one in site-perl must have come from cpan.

Hopefully this will allow me to see the bayes rules again as I did
"/usr/sbin/amavisd -d bayes debug-sa" as user amavis and got not errors
about version mismatches.

I should see the results shortly.

Thanks for your help!

Dave

On Tue, 2006-11-28 at 14:39 -0500, Theo Van Dinter wrote:
> On Tue, Nov 28, 2006 at 01:35:02PM -0600, Dave Augustus wrote:
> > config: configuration file "/usr/share/spamassassin/23_bayes.cf"
> > requires version 3.001007 of SpamAssassin, but this is code version
> > 3.001001. Maybe you need to use the -C switch, or remove the old config
> > 
> > So my rpm -qa|grep spam lists:
> > spamassassin-3.1.7-1.el4.rf
> > 
> > Why would it error out on files that came with it?
> 
> You're making a number of assumptions in that statement, some of which are
> false.  The short version is that your rules are from 3.1.7, but you're
> running the 3.1.1 perl modules.  Fix your install and you should be ok.
> 


Re: Why no bayes?

Posted by Theo Van Dinter <fe...@apache.org>.
On Tue, Nov 28, 2006 at 01:35:02PM -0600, Dave Augustus wrote:
> config: configuration file "/usr/share/spamassassin/23_bayes.cf"
> requires version 3.001007 of SpamAssassin, but this is code version
> 3.001001. Maybe you need to use the -C switch, or remove the old config
> 
> So my rpm -qa|grep spam lists:
> spamassassin-3.1.7-1.el4.rf
> 
> Why would it error out on files that came with it?

You're making a number of assumptions in that statement, some of which are
false.  The short version is that your rules are from 3.1.7, but you're
running the 3.1.1 perl modules.  Fix your install and you should be ok.

-- 
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: Why no bayes?

Posted by Dave Augustus <da...@ingraftedsoftware.com>.
Thanks for the debug syntax. This is a sitewide configuration so I run
amavisd-new as the user amavis.

I think I found out why bayes are not tagging. This line shows up when I
run the debug command as amavis: amavisd -d bayes debug-sa

config: configuration file "/usr/share/spamassassin/23_bayes.cf"
requires version 3.001007 of SpamAssassin, but this is code version
3.001001. Maybe you need to use the -C switch, or remove the old config
files? Skipping this file
at /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Conf/Parser.pm line
342.

So my rpm -qa|grep spam lists:
spamassassin-3.1.7-1.el4.rf

Why would it error out on files that came with it?

Dave

On Tue, 2006-11-28 at 09:38 -0700, Gary V wrote:
> >I NEVER get any bayes_?? in my headers
> 
> >Here is the output as the amavis user:
> >
> >0.000          0      64741          0  non-token data: nspam
> >0.000          0     361103          0  non-token data: nham
> 
> I would suggest running amavisd-new in debug-sa mode to see what it says 
> about bayes. If using amavisd-new 2.4.3 or 2.4.4, you can limit output:
> 
> amavisd stop
> amavisd -d bayes debug-sa
> 
> otherwise use:
> amavisd stop
> amavisd debug-sa
> 
> After sending a message through, I get stuff like:
> [31597] dbg: bayes: database connection established
> [31597] dbg: bayes: found bayes db version 3
> [31597] dbg: bayes: Using userid: 2
> [31597] dbg: bayes: corpus size: nspam = 138743, nham = 17474
> <..lots of stuff..>
> [31597] dbg: bayes: score = 0.497532008722465
> 
> Not related to the problem at hand, but if you are learning spam and ham as 
> root (as it appears you are), amavis will not benefit from root's data. You 
> can have all the stuff learned under one user (regardless who runs sa-learn) 
> by setting (for example):
> 
> bayes_sql_override_username vscan
> (whatever your amavis user is called)
> 
> Are you getting X-Spam-Status headers?
> 
> Gary V
> 
> _________________________________________________________________
> Fixing up the home? Live Search can help 
> http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US&source=hmemailtaglinenov06&FORM=WLMTAG
> 


RE: Why no bayes?

Posted by Gary V <mr...@hotmail.com>.
>I NEVER get any bayes_?? in my headers

>Here is the output as the amavis user:
>
>0.000          0      64741          0  non-token data: nspam
>0.000          0     361103          0  non-token data: nham

I would suggest running amavisd-new in debug-sa mode to see what it says 
about bayes. If using amavisd-new 2.4.3 or 2.4.4, you can limit output:

amavisd stop
amavisd -d bayes debug-sa

otherwise use:
amavisd stop
amavisd debug-sa

After sending a message through, I get stuff like:
[31597] dbg: bayes: database connection established
[31597] dbg: bayes: found bayes db version 3
[31597] dbg: bayes: Using userid: 2
[31597] dbg: bayes: corpus size: nspam = 138743, nham = 17474
<..lots of stuff..>
[31597] dbg: bayes: score = 0.497532008722465

Not related to the problem at hand, but if you are learning spam and ham as 
root (as it appears you are), amavis will not benefit from root's data. You 
can have all the stuff learned under one user (regardless who runs sa-learn) 
by setting (for example):

bayes_sql_override_username vscan
(whatever your amavis user is called)

Are you getting X-Spam-Status headers?

Gary V

_________________________________________________________________
Fixing up the home? Live Search can help 
http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US&source=hmemailtaglinenov06&FORM=WLMTAG


RE: Why no bayes?

Posted by Dave Augustus <da...@ingraftedsoftware.com>.
Here is the output as the amavis user:

0.000          0          3          0  non-token data: bayes db version
0.000          0      64741          0  non-token data: nspam
0.000          0     361103          0  non-token data: nham
0.000          0     498872          0  non-token data: ntokens
0.000          0 1157563006          0  non-token data: oldest atime
0.000          0 1164728195          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal
sync atime
0.000          0 1157605205          0  non-token data: last expiry
atime
0.000          0      43200          0  non-token data: last expire
atime delta
0.000          0       7911          0  non-token data: last expire
reduction count



On Mon, 2006-11-27 at 16:56 -0700, Gary V wrote:
> >I NEVER get any bayes_?? in my headers
> >
> >Why?
> >
> >Running:
> >Amavisd-new
> >spamassassin-3.1.7
> >amavisd-new-2.4
> >
> >I am storing bayes in SQL as I need it available for more than one
> >server.
> >
> >"sa-learn --dump magic" shows:
> >
> >0.000          0          3          0  non-token data: bayes db version
> >0.000          0      10950          0  non-token data: nspam
> >0.000          0      40395          0  non-token data: nham
> >0.000          0     120716          0  non-token data: ntokens
> >0.000          0 1130788224          0  non-token data: oldest atime
> >0.000          0 1131330249          0  non-token data: newest atime
> >0.000          0          0          0  non-token data: last journal
> >sync atime
> >0.000          0 1143487659          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
> >
> >
> >Thanks,
> >Dave
> >
> 
> What does it say if you run this as the amavisd-new user?
> 
> Gary V
> 
> _________________________________________________________________
> Share your latest news with your friends with the Windows Live Spaces 
> friends module. 
> http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mk
> 


RE: Why no bayes?

Posted by Gary V <mr...@hotmail.com>.
>I NEVER get any bayes_?? in my headers
>
>Why?
>
>Running:
>Amavisd-new
>spamassassin-3.1.7
>amavisd-new-2.4
>
>I am storing bayes in SQL as I need it available for more than one
>server.
>
>"sa-learn --dump magic" shows:
>
>0.000          0          3          0  non-token data: bayes db version
>0.000          0      10950          0  non-token data: nspam
>0.000          0      40395          0  non-token data: nham
>0.000          0     120716          0  non-token data: ntokens
>0.000          0 1130788224          0  non-token data: oldest atime
>0.000          0 1131330249          0  non-token data: newest atime
>0.000          0          0          0  non-token data: last journal
>sync atime
>0.000          0 1143487659          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
>
>
>Thanks,
>Dave
>

What does it say if you run this as the amavisd-new user?

Gary V

_________________________________________________________________
Share your latest news with your friends with the Windows Live Spaces 
friends module. 
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mk