SpamAssassin broken since Sarge upgrade

SpamAssassin broken since Sarge upgrade

Posted by: Matthew
Posted on: 2005-09-10 14:06:00

I’m hoping there are some SpamAssassin (SA) experts who can help. This all started about the time DH upgraded to Sarge. I first noticed the problem when my cron job failed to update my SA Bayes database. I finally tracked the problem to being an outdated Berkeley database format. However, once updated, SA could no longer gain access or “tie” to the database for using Bayes tests on incoming mail. So, I upgraded SA.

After removing the old 3.0.2 version and installing 3.0.4, I recreated the Bayes databases (sa-learn) from my e-mails; no import or upgrade to any previous databases. However, I still have the same problem. Here’s the error as reported in my procmail log file:

Cannot open bayes databases /home/ccrumley/.spamassassin/bayes_* R/O: tie failed:
Cannot open bayes databases /home/ccrumley/.spamassassin/bayes_* R/O: tie failed:
Cannot open bayes databases /home/ccrumley/.spamassassin/bayes_* R/O: tie failed:

It’s failing to “tie” to the bayes_seen, bayes_toks, and auto-whitelist databases. I’ve tried the db_dump/load tip as listed here but with no success. It could possibly be a problem with Perl’s DB_File but I wouldn’t know how to fix that.

Any ideas? I’m not sure what version of SA that DH is running, but if they keep it current, I might consider abandoning my self-installed copy.

-Matt

Re: SpamAssassin broken since Sarge upgrade

Posted by: ardco
Posted on: 2005-09-10 20:58:00

> Any ideas? I’m not sure what version of SA that DH is running, but if they keep it current, I might consider abandoning my self-installed copy.

My 3.0.2 seems to be working ok after upgrade.

/usr/bin/spamassassin -h says version 2.2 (!).

Last time I upgraded my local SA I started the database over, IIRC.

Good luck,

BobS

Re: SpamAssassin broken since Sarge upgrade

Posted by: Matthew
Posted on: 2005-09-11 17:26:00

Okay, this is getting more confusing. You say DH is running SpamAssassin version 2.2? It must be a different machine than mine. I run:

/usr/bin/spamassassin -V

and it returns:

SpamAssassin version 3.0.3
running on Perl version 5.8.4





Re: SpamAssassin broken since Sarge upgrade

Posted by: lrosenstein
Posted on: 2005-09-13 09:55:00

I don't think it's SA; its the version of libdb being used by Perl. The Sarge machines are using a later version of Perl that uses a later version of libdb. (I'm using a self-installed version of SA 3.0.4.)

It turns out that libdb3 is installed on the Sarge machines. I downloaded the source to the DB_File Perl module and rebuilt it to use libdb3, but I couldn't figure out how to get SA to use the modified DB_File. Perl isn't my forte, so I probably did something wrong.




Re: SpamAssassin broken since Sarge upgrade

Posted by: Matthew
Posted on: 2005-09-14 20:22:00

Did you build SA with your own installed version of Perl? I'd be willing to try that option. I'm still not sure if DH is done with the upgrades, so I want to wait for the dust to settle and try installing SA later.

Re: SpamAssassin broken since Sarge upgrade

Posted by: lrosenstein
Posted on: 2005-09-14 20:33:00

I didn't go that far, but that probably would work.

There was a note in another thread about SpamAssassin that DH would be upgrading its mail servers to Sarge in a few weeks and the problem would go away.



Re: SpamAssassin broken since Sarge upgrade

Posted by: Matthew
Posted on: 2005-09-17 17:35:00

I hope that's the case. DB_File must be the problem. I upgraded to SA v3.1.0 and it's giving me the same R/O tie failed problem when it tries to open the Bayes database files.

-Matt

Re: SpamAssassin broken since Sarge upgrade

Posted by: ItsMikeE
Posted on: 2005-09-22 10:47:00

Can someone explain what runs on the mail server, and what runs on the "local" server where I have put my spamassassin code?

Re: SpamAssassin broken since Sarge upgrade

Posted by: lrosenstein
Posted on: 2005-09-22 17:37:00

Here's my guess. (I don't know how things really work.) When a message is delivered, all of the processing is done on the mail server. The mail server will, however, run your locally installed version of spamassassin if that's how you set things up. It does this using its own version of Perl, which uses the older libdb. If you run sa-learn (manually or in a cron job) the code is running on the shared hosting machine using a later version of Perl, which uses a newer libdb.



Re: SpamAssassin broken since Sarge upgrade

Posted by: ItsMikeE
Posted on: 2005-09-23 07:13:00

Interesting.
That could explain some of the messages I see when I set procmail to verbose logging (such as version of DNS is too low).
If I compile Razor, would razor need to be on the mail server as well?

Re: SpamAssassin broken since Sarge upgrade

Posted by: Matthew
Posted on: 2005-09-23 17:23:00

I've been reading SA documentation on how to use SQL databases for storing Bayes tokens. I don't know if it will work but it's worth trying. If I find that it works, I'll post the steps here.

-Matt

Re: SpamAssassin broken since Sarge upgrade

Posted by: Matthew
Posted on: 2005-09-23 20:11:00

Good news!

This evening I decided to try the Bayes DB implementation using MySQL. To my surprise it worked! I need to collect all my notes and get right what changes are necessary before I write a detailed procedure for implementing SpamAssassin with MySQL. The Bayes mail tests seem to be working fine...no R/O tie failures as before.

Although I'm pleased DH made some upgrades, I was really unhappy those upgrades broke SpamAssassin. After SA broke, my SPAM went up to about 10 messages a day. Prior to that I was only getting 10 a week! I guess it shows the power of Bayesian filtering.

-Matt

Re: SpamAssassin broken since Sarge upgrade

Posted by: ItsMikeE
Posted on: 2005-09-24 07:14:00

I set up MySQL the other day and it did not take too long, and has been working fine.

Tags: debugmailbayesusrspamassassinpathdatabasesrunningcron jobsargex11gameslocal