View Full Version : Questions on Spamassassin 3.1.0

11-03-2005, 08:45 AM

I just upgraded to WestHost's version of Spamassassin 3.1.0, and have a couple questions on how to best utilize it. WestHost hasn't really provided any documentation on the new environment.

1. How does each user now feed spam/ham to the bayes learner? Apparently each user now has their own token databases, but I'm not sure how each user is supposed to feed them.

2. Has anyone been able to verify the auto-learn is working? In the headers, sometimes I see "autolearn=no", but other times I see "autolearn=unavailable".

That's all I can think of for now. It's working decently well right now, but the bayes filtering really helped with the previous version I had installed, so I'm hoping to get it all working in this version.

11-04-2005, 09:48 AM
I was having similar problems. It looks like you have to have 'auto learn' and 'use bayes' enabled in spamassassin's global settings. I guess settings in 'user_prefs' can only disable it if it is enabled and not the other way around.

Also, you need some of the perl mods that are included in 'Perl MySQL' in order for SpamAssassin to be able to create its database. (WH really needs to document that one!)

You can also use the 'sa-learn' executable in /usr/local/perl/bin. feed it a bunch of spam to train SpamAssassin to recognize it.


11-12-2005, 02:44 PM
Also, you need some of the perl mods that are included in 'Perl MySQL' in order for SpamAssassin to be able to create its database. (WH really needs to document that one!)
Hi Cheddarmakerman,

Can you expound on this? I'm having trouble with Spamassassin saying it can't open the bayes db's. I have the following site apps installed:

- MySQL4 4.1.9
- PerlMySQL 1.48
- Perl 5.8.7

When I attempt to do the following command:

[/usr/local/perl/bin]$./sa-learn -D --dump magic
At the very bottom of the returned output, I receive the following error (I see this in other Spamassassin tests):

[7314] dbg: bayes: tie-ing to DB file R/O /home/<domainuser>/.spamassassin/bayes_toks
bayes: cannot open bayes databases /home/<domainuser>/.spamassassin/bayes_* R/O: tie failed:
[7314] dbg: bayes: untie-ing DB file toks
ERROR: Bayes dump returned an error, please re-run with -D for more information
When I look in that home directory, I do see that db along with the following:

-rw------- 1 <domainuser> vuser 40960 Apr 16 2005 _seen
-rw------- 1 <domainuser> vuser 40960 Apr 16 2005 _toks
-rw------- 1 <domainuser> vuser 12288 Nov 7 19:36 auto-whitelist
-rw------- 1 <domainuser> vuser 40164 Nov 2 20:32 bayes_journal
-rw------- 1 <domainuser> vuser 5259264 Nov 2 20:28 bayes_seen
-rw------- 1 <domainuser> vuser 5480448 Nov 2 20:28 bayes_toks
-rw-r--r-- 1 <domainuser> vuser 1218 Apr 1 2004 user_prefs

I'm not sure what needs to be fixed to get bayes filtering working. I put in a help request, which was elevated to level 2, but it seems to have gotten no attention for a week or so. Any idea what I might look at to try to fix this?

I had been using Spamassassin 2.63 with bayes turned on. Is it possible I need to delete all the token databases and start with a clean filesystem?

11-12-2005, 03:11 PM
Removing the old db files and starting over seems to have fixed the problem. I'm guessing the older db files weren't compatible.

11-14-2005, 02:37 PM
on my account when i tried running "sa" from the command-line, i found it was using a new database in $HOME/.spamassassin, and not the one that incoming email for the default account uses, which is in /.spamassassin . i made a symlink from ~/.spamassassin to /.spamassassin .

you wouldn't see this if you aren't using the default account.

04-06-2006, 04:21 PM
Could this be moved to the Solutions area? I think it has some really good information it that may be getting missed by folks. In fact you run in to quite a few problems when you try to move to SA 3.1.0 Like if you want to install PerlMySQL 1.48 you also have to update to MySQL4 4.1.9 if you happen to be running an older version. That is in turn going to affect any databases you may be running for like phpBB. :) Just gets deeper and deeper.