You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Dimitri Yioulos <dy...@firstbhph.com> on 2011/04/22 22:19:38 UTC

I messed up Bayes

Greetz, all.

My question may have been answered in the past, 
but I wouldn't even know what search terms to 
use.  Apologies if that's the case

Over the past few days, I've had some spam leaking 
through what has been an old, but reliable system 
(consisting of the latest Sendmail, MailScanner, 
clamav, MailWatch, and an older Spamassassin, all 
running on a CentOS box).  Up to this point, most 
spam was easily tagged and dealt with.  But, I 
figured I'd upgrade to the latest SA, thereby 
using the most recent rules.  Good in theory, bad 
in practice, because it messed up Bayes.  
Regardless of whether I tried to do it manually, 
or via MailWatch, when I did an sa-learn, I got 
the following:

SA Learn: config: configuration 
file "/etc/mail/spamassassin/20_advance_fee.cf" 
requires version 3.003001 of SpamAssassin, but 
this is code version 3.002005. Maybe you need to 
use the -C switch, or remove the old config 
files? Skipping this file 
at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin/Conf/Parser.pm 
line 372.

That's just a snippet; every rule does the same.  
So, I figured I'd role back to the previous 
version of SA.  Trying sa-learn again, I now get 
the following:

SA Learn: config: configuration 
file "/etc/mail/spamassassin/20_advance_fee.cf" 
requires version 3.002005 of SpamAssassin, but 
this is code version 3.002004. Maybe you need to 
use the -C switch, or remove the old config 
files? Skipping this file 
at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin/Conf/Parser.pm 
line 372.

In other words, Bayes (or something) seems to be 
looking at a previous configuration, or 
whatever.

I think (the operative word, here) that I made a 
good backup copy of the Bayes DB.  That having 
been said, how do I correct this problem?

As ever, many thanks.

Dimitri

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Re: I messed up Bayes

Posted by Dimitri Yioulos <dy...@firstbhph.com>.
On Friday 22 April 2011 4:31:37 pm Bowie Bailey 
wrote:
> On 4/22/2011 4:19 PM, Dimitri Yioulos wrote:
> > Greetz, all.
> >
> > My question may have been answered in the
> > past, but I wouldn't even know what search
> > terms to use.  Apologies if that's the case
> >
> > Over the past few days, I've had some spam
> > leaking through what has been an old, but
> > reliable system (consisting of the latest
> > Sendmail, MailScanner, clamav, MailWatch, and
> > an older Spamassassin, all running on a
> > CentOS box).  Up to this point, most spam was
> > easily tagged and dealt with.  But, I figured
> > I'd upgrade to the latest SA, thereby using
> > the most recent rules.  Good in theory, bad
> > in practice, because it messed up Bayes.
> > Regardless of whether I tried to do it
> > manually, or via MailWatch, when I did an
> > sa-learn, I got the following:
> >
> > SA Learn: config: configuration
> > file
> > "/etc/mail/spamassassin/20_advance_fee.cf"
> > requires version 3.003001 of SpamAssassin,
> > but this is code version 3.002005. Maybe you
> > need to use the -C switch, or remove the old
> > config files? Skipping this file
> > at
> > /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAss
> >assin/Conf/Parser.pm line 372.
> >
> > That's just a snippet; every rule does the
> > same. So, I figured I'd role back to the
> > previous version of SA.  Trying sa-learn
> > again, I now get the following:
> >
> > SA Learn: config: configuration
> > file
> > "/etc/mail/spamassassin/20_advance_fee.cf"
> > requires version 3.002005 of SpamAssassin,
> > but this is code version 3.002004. Maybe you
> > need to use the -C switch, or remove the old
> > config files? Skipping this file
> > at
> > /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAss
> >assin/Conf/Parser.pm line 372.
> >
> > In other words, Bayes (or something) seems to
> > be looking at a previous configuration, or
> > whatever.
> >
> > I think (the operative word, here) that I
> > made a good backup copy of the Bayes DB. 
> > That having been said, how do I correct this
> > problem?
>
> The problem is not Bayes, but your SA config. 
> It looks like you had SA 3.2.5 installed via
> one method and you upgraded to SA 3.3.1 via a
> different method.  This results in both
> versions remaining on your system and causing
> strange problems.
>
> How did you install the new version?  RPM? 
> CPAN?
>
> --
> Bowie


Hi, Bowie.

Glad you're still aboard.

Installed via RPM.  I did an rpm -e to remove 
previous version.

Dimitri

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Re: I messed up Bayes

Posted by Bowie Bailey <Bo...@BUC.com>.
On 4/22/2011 4:19 PM, Dimitri Yioulos wrote:
> Greetz, all.
>
> My question may have been answered in the past, 
> but I wouldn't even know what search terms to 
> use.  Apologies if that's the case
>
> Over the past few days, I've had some spam leaking 
> through what has been an old, but reliable system 
> (consisting of the latest Sendmail, MailScanner, 
> clamav, MailWatch, and an older Spamassassin, all 
> running on a CentOS box).  Up to this point, most 
> spam was easily tagged and dealt with.  But, I 
> figured I'd upgrade to the latest SA, thereby 
> using the most recent rules.  Good in theory, bad 
> in practice, because it messed up Bayes.  
> Regardless of whether I tried to do it manually, 
> or via MailWatch, when I did an sa-learn, I got 
> the following:
>
> SA Learn: config: configuration 
> file "/etc/mail/spamassassin/20_advance_fee.cf" 
> requires version 3.003001 of SpamAssassin, but 
> this is code version 3.002005. Maybe you need to 
> use the -C switch, or remove the old config 
> files? Skipping this file 
> at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin/Conf/Parser.pm 
> line 372.
>
> That's just a snippet; every rule does the same.  
> So, I figured I'd role back to the previous 
> version of SA.  Trying sa-learn again, I now get 
> the following:
>
> SA Learn: config: configuration 
> file "/etc/mail/spamassassin/20_advance_fee.cf" 
> requires version 3.002005 of SpamAssassin, but 
> this is code version 3.002004. Maybe you need to 
> use the -C switch, or remove the old config 
> files? Skipping this file 
> at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin/Conf/Parser.pm 
> line 372.
>
> In other words, Bayes (or something) seems to be 
> looking at a previous configuration, or 
> whatever.
>
> I think (the operative word, here) that I made a 
> good backup copy of the Bayes DB.  That having 
> been said, how do I correct this problem?

The problem is not Bayes, but your SA config.  It looks like you had SA
3.2.5 installed via one method and you upgraded to SA 3.3.1 via a
different method.  This results in both versions remaining on your
system and causing strange problems.

How did you install the new version?  RPM?  CPAN?

-- 
Bowie

Re: I messed up Bayes

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Sat, 2011-04-23 at 09:06 -0400, Dimitri Yioulos wrote:
> The whole piece about the improperly placed stock rule-set may have
> been my doing.

Possible. Though your OP doesn't really back that up. As I pointed out,
after your upgrading to 3.3.1, *and* again after reverting to 3.2.5, the
improperly placed stock rule-set in your site-config matched the
version. No way this is cruft inherited from years ago. Whereas the
sa-learn version also changed, but always was an older version than the
rules and the SA you just installed.


> In the way-back (se3ven years?), I,ll concede that I probably set that
> up improperly as I tried to learn, install, and configure sendmail,
> mailscanner, clamav, mailwatch, spamassassin, etc.  S now, I suppose,
> with the kind assistance of the list, I can make things right.  This
> is an old set-up that,s due to be updated (new box, recent OS,
> up-to-date components, etc.) in during the next month anyway.
> 
> Using "locate", I find only "/usr/sbin/sa-update" and its man page.

Are you positive the locate database has been updated since your latest
changes? If not, that's precisely why I suggested to use 'find'.


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}


Re: I messed up Bayes

Posted by Dimitri Yioulos <dy...@firstbhph.com>.
On Sat, 23 Apr 2011 01:00:02 +0200, Karsten Bräckelmann wrote
> On Fri, 2011-04-22 at 17:38 -0400, Dimitri Yioulos wrote:
> > > Well, that does not explain why or how the
> > > stock rules ended up in your site config dir --
> > > neither why their version changes, though *not*
> > > in sync with the installed sa-learn script.
> > >
> > > Did you perhaps run sa-update with some bad
> > > arguments, like target dir? It's not a symlink
> > > either, right?
> > >
> > > Do you perhaps have more than one sa-learn
> > > script on your box?
> 
> 'find' is your friend.
> 
> > I did not run sa-learn with any bad arguments, nor 
> > is it symlinked.
> 
> The first part (about the arguments) was about sa-update, not sa-learn.
> The symlink was referring to /etc/mail/spamassassin -- I am trying to
> find out the reason for the improperly placed stock rule-set in that
> dir, and it's version mis-match.
> 
> > As to the line length, sorry.  Another list asked 
> > me to change it to present length.  What would be 
> > appropriate?  80?
> 
> I was mostly joking, but what list would request you to use such short
> lines? About 72-76 would be most appropriate, from a historic point of
> view...
> 
> -- 
> char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
> main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
> (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.


Karsten,

The whole piece about the improperly placed stock rule-set may have been my doing.  In
the way-back (se3ven years?), I,ll concede that I probably set that up improperly as I
tried to learn, install, and configure sendmail, mailscanner, clamav, mailwatch,
spamassassin, etc.  S now, I suppose, with the kind assistance of the list, I can make
things right.  This is an old set-up that,s due to be updated (new box, recent OS,
up-to-date components, etc.) in during the next month anyway.

Using "locate", I find only "/usr/sbin/sa-update" and its man page.

I'll "fix" the col length of my MUA, too  :-)  "

Dimitri

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Re: I messed up Bayes

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Fri, 2011-04-22 at 17:38 -0400, Dimitri Yioulos wrote:
> > Well, that does not explain why or how the
> > stock rules ended up in your site config dir --
> > neither why their version changes, though *not*
> > in sync with the installed sa-learn script.
> >
> > Did you perhaps run sa-update with some bad
> > arguments, like target dir? It's not a symlink
> > either, right?
> >
> > Do you perhaps have more than one sa-learn
> > script on your box?

'find' is your friend.


> I did not run sa-learn with any bad arguments, nor 
> is it symlinked.

The first part (about the arguments) was about sa-update, not sa-learn.
The symlink was referring to /etc/mail/spamassassin -- I am trying to
find out the reason for the improperly placed stock rule-set in that
dir, and it's version mis-match.


> As to the line length, sorry.  Another list asked 
> me to change it to present length.  What would be 
> appropriate?  80?

I was mostly joking, but what list would request you to use such short
lines? About 72-76 would be most appropriate, from a historic point of
view...


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}


Re: I messed up Bayes

Posted by Dimitri Yioulos <dy...@firstbhph.com>.
On Friday 22 April 2011 5:17:20 pm Karsten 
Bräckelmann wrote:
> On Fri, 2011-04-22 at 16:55 -0400, Dimitri 
Yioulos wrote:
> > Don't know how I managed to mangle my SA
> > configuration, but how you all will help me
> > untangle.  I used the Dag repo for version
> > 3.2.5, but ran rpmbuild against the SA
> > tarball for 3.3.1 (I can almost see you
> > grimacing).  Previous version was removed
> > with rpm -e.  It's possible the I did an rpm
> > -Uvh to upgrade old to new.
>
> Well, that does not explain why or how the
> stock rules ended up in your site config dir --
> neither why their version changes, though *not*
> in sync with the installed sa-learn script.
>
> Did you perhaps run sa-update with some bad
> arguments, like target dir? It's not a symlink
> either, right?
>
> Do you perhaps have more than one sa-learn
> script on your box?
>
>
> Oh, any why does your MUA believe 50 chars
> would be an appropriate line length? ;)
>
> > (excuse time - we moved our 75-person office
> > this past week, and I managed the project. 
> > Note to self - don't mess around with stuff
> > when dog tired).
>
> --


Karsten,

I did not run sa-learn with any bad arguments, nor 
is it symlinked.

As to the line length, sorry.  Another list asked 
me to change it to present length.  What would be 
appropriate?  80?

Dimitri

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Re: I messed up Bayes

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Fri, 2011-04-22 at 16:55 -0400, Dimitri Yioulos wrote:
> Don't know how I managed to mangle my SA configuration, but how you all
> will help me untangle.  I used the Dag repo for version 3.2.5, but ran
> rpmbuild against the SA tarball for 3.3.1 (I can almost see you
> grimacing).  Previous version was removed with rpm -e.  It's possible 
> the I did an rpm -Uvh to upgrade old to new.

Well, that does not explain why or how the stock rules ended up in your
site config dir -- neither why their version changes, though *not* in
sync with the installed sa-learn script.

Did you perhaps run sa-update with some bad arguments, like target dir?
It's not a symlink either, right?

Do you perhaps have more than one sa-learn script on your box?


Oh, any why does your MUA believe 50 chars would be an appropriate line
length? ;)


> (excuse time - we moved our 75-person office this past week, and I
> managed the project.  Note to self - don't mess around with stuff when
> dog tired).

-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}


Re: I messed up Bayes

Posted by Dimitri Yioulos <dy...@firstbhph.com>.
On Friday 22 April 2011 4:44:57 pm Karsten 
Bräckelmann wrote:
> On Fri, 2011-04-22 at 16:19 -0400, Dimitri 
Yioulos wrote:
> > Over the past few days, I've had some spam
> > leaking through what has been an old, but
> > reliable system (consisting of the latest
> > Sendmail, MailScanner, clamav, MailWatch, and
> > an older Spamassassin, all running on a
> > CentOS box).  Up to this point, most spam was
> > easily tagged and dealt with.  But, I figured
> > I'd upgrade to the latest SA, thereby using
> > the most recent rules.  Good in theory, bad
> > in practice, because it messed up Bayes. 
> > Regardless of whether I tried to do it
> > manually, or via MailWatch, when I did an
> > sa-learn, I got the following:
> >
> > SA Learn: config: configuration file
> > "/etc/mail/spamassassin/20_advance_fee.cf"
> > requires version 3.003001
>
>    ^^^^^^^^^^^^^^^^^^^^^^^
> That is NOT the place for the SA stock
> rule-set, but your local site config only.
>
> Seems, you did not mess up your Bayes DB, but
> the installation of the new SA version 3.3.1.
> The next line clearly shows the 'sa-learn' you
> are running is an older version, 3.2.5.
>
> > of SpamAssassin, but this is code version
> > 3.002005. Maybe you need to use the -C
> > switch, or remove the old config files?
> > Skipping this file at
> > /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAss
> >assin/Conf/Parser.pm line 372.
> >
> > That's just a snippet; every rule does the
> > same.  So, I figured I'd role back to the
> > previous version of SA.  Trying sa-learn
> > again, I now get the following:
> >
> > SA Learn: config: configuration file
> > "/etc/mail/spamassassin/20_advance_fee.cf"
> > requires version 3.002005 of SpamAssassin,
> > but this is code version 3.002004. Maybe you
> > need to use the -C switch, or remove the old
> > config files? Skipping this file at
> > /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAss
> >assin/Conf/Parser.pm line 372.
>
> Similar picture. Your "rolling back" to SA
> 3.2.5 severely borked your installation
> somehow, again, putting the stock rule-set in
> your site config.
>
> Strangely enough, your 'sa-learn' this time is
> 3.2.4 (!) though.
>
> > In other words, Bayes (or something) seems to
> > be looking at a previous configuration, or
> > whatever.
>
> Or whatever. ;)
>
> (a) Your installation is severely broken, with
> stock rule-set ending up in your site-config.
>
> (b) For some strange reason, you manage to
> always run an older sa-learn executable, than
> would have been expected.
>
> How exactly did you install 3.3.1? How exactly
> did you revert?
>
>
> --
> char
> *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\
>x51\x8a\x10\xf4\xf4\xc4"; main(){ char
> h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for
> (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 &&
> (s+=h); if (!(h>>=1)||!t[s+h]){
> putchar(t[s]);h=m;s=0; }}}


Hi, Karsten.

Also glad you're aboard.

Don't know how I managed to mangle my SA 
configuration, but how you all will help me 
untangle.  I used the Dag repo for version 3.2.5, 
but ran rpmbuild against the SA tarball for 3.3.1 
(I can almost see you grimacing).  Previous 
version was removed with rpm -e.  It's possible 
the I did an rpm -Uvh to upgrade old to new.  
(excuse time - we moved our 75-person office this 
past week, and I managed the project.  Note to 
self - don't mess around with stuff when dog 
tired).

Dimitri

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Re: I messed up Bayes

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Fri, 2011-04-22 at 16:19 -0400, Dimitri Yioulos wrote:
> Over the past few days, I've had some spam leaking through what has
> been an old, but reliable system (consisting of the latest Sendmail,
> MailScanner, clamav, MailWatch, and an older Spamassassin, all running
> on a CentOS box).  Up to this point, most spam was easily tagged and
> dealt with.  But, I figured I'd upgrade to the latest SA, thereby
> using the most recent rules.  Good in theory, bad in practice, because
> it messed up Bayes.  Regardless of whether I tried to do it manually, 
> or via MailWatch, when I did an sa-learn, I got the following:
> 
> SA Learn: config: configuration file
> "/etc/mail/spamassassin/20_advance_fee.cf" requires version 3.003001
   ^^^^^^^^^^^^^^^^^^^^^^^
That is NOT the place for the SA stock rule-set, but your local site
config only.

Seems, you did not mess up your Bayes DB, but the installation of the
new SA version 3.3.1. The next line clearly shows the 'sa-learn' you are
running is an older version, 3.2.5.

> of SpamAssassin, but this is code version 3.002005. Maybe you need to 
> use the -C switch, or remove the old config files? Skipping this file 
> at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin/Conf/Parser.pm
> line 372.
> 
> That's just a snippet; every rule does the same.  So, I figured I'd
> role back to the previous version of SA.  Trying sa-learn again, I now
> get the following:
> 
> SA Learn: config: configuration file
> "/etc/mail/spamassassin/20_advance_fee.cf" requires version 3.002005
> of SpamAssassin, but this is code version 3.002004. Maybe you need to 
> use the -C switch, or remove the old config files? Skipping this file 
> at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin/Conf/Parser.pm
> line 372.

Similar picture. Your "rolling back" to SA 3.2.5 severely borked your
installation somehow, again, putting the stock rule-set in your site
config.

Strangely enough, your 'sa-learn' this time is 3.2.4 (!) though.


> In other words, Bayes (or something) seems to be looking at a previous
> configuration, or whatever.

Or whatever. ;)

(a) Your installation is severely broken, with stock rule-set ending up
in your site-config.

(b) For some strange reason, you manage to always run an older sa-learn
executable, than would have been expected.

How exactly did you install 3.3.1? How exactly did you revert?


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}