I just thought I'd let you know how I fixed a bayes error that I was getting
when running sa-learn --dump

Use of uninitialized value in numeric lt (<) at
/usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/BayesStore.pm line
1281.
0.000          0          0          0  non-token data: bayes db version
0.000          0          0          0  non-token data: nspam
0.000          0          0          0  non-token data: nham
0.000          0          0          0  non-token data: ntokens
0.000          0          0          0  non-token data: oldest atime
0.000          0          0          0  non-token data: current
scan-0.000          0          0          0  non-token data: last expiry
atime

First of all I decided to use RPM's instead of CPAN and had to re-install.

In order to uninstall CPAN perl modules I (at the suggestion of Landy -
thanks!) installed webmin (http://www.webmin.com) which seemed to be only
way to uninstall a perl module. After a few minutes of clicking all perl
modules were gone.

I then built rpm's from the source using:
rpmbuild --rebuild /usr/src/redhat/SRPMS/spamassassin-2.60-1.src.rpm

Which placed the three modules into:
/usr/src/redhat/RPMS/i386
(It's a Redhat 8.0 system).

Check out Charles helpful email at:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg23144.html

Then ran:
rpm -Uvh perl-Mail-SpamAssassin-2.60-1.i386.rpm spamassassin-2.60-1.i386.rpm
spamassassin-tools-2.60-1.i386.rpm

to install them avoiding all conflicts.

When running:
spamassassin -D --lint (I took a wild guess here and assumed -D would be
debug). I was seeing a strange Bayes error in the middle:

debug: bayes: DB_File module not installed, cannot use Bayes

So a quick search of rpmfind.net showed that I needed "perl-DB_file" which
was a module I'd deleted under CPAN.  Downloaded that from here:
http://rpmfind.net/linux/rpm2html/search.php?query=perl-DB_file

installed it and then ran sa-learn --dump again to find it was clean this
time.

then ran
sa-learn --spam --mbox SPAM

which worked.. and now I have a DB again.

sa-learn --dump
0.000          0          2          0  non-token data: bayes db version
0.000          0         15          0  non-token data: nspam
0.000          0          0          0  non-token data: nham
0.000          0       1581          0  non-token data: ntokens
0.000          0 1066032191          0  non-token data: oldest atime
0.000          0 1066575968          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal sync
atime
0.000          0          0          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 co
unt

So.. looks like that error is *possibly* caused by not having the perl-DB
module installed and I got into the bind by uninstalling the CPAN modules
and going via RPMs, but my install and all dependancies weren't complete.

I only found this out by guessing at the -D option for spamassissin --lint.
Would be nice to see this documented on the product home page. ;-)

Thought I'd share the good news in case anyone else was also in a bind and
also for documentation purposes.

Chris



-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to