Spamassassin Autolearn

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
kwebdesign
Forum User
Forum User
Posts: 93
Joined: Sun Feb 13, 2005 2:24 pm
Location: TN

Spamassassin Autolearn

Unread post by kwebdesign »

I see in my mail log that spamassassin claims to be autolearning messages (as expected), but when I look at the stats (sa-learn --dump magic), I don't see the number of ham and spam messages increasing. Should it be? Does spamassassin keep its autolearn data somewhere besides the bayes db?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

youve got to set the path to the bayes db of the user it runs as. If its qmail-scanner its in /var/spool/qscan/.spamassassin
kwebdesign
Forum User
Forum User
Posts: 93
Joined: Sun Feb 13, 2005 2:24 pm
Location: TN

Unread post by kwebdesign »

The bayes db is there, and it gets updated when I use sa-learn manually, it's just not updating via autolearn. Do I have to specifically set that up? If so, where?

Thanks.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Nope, its all automatic
kwebdesign
Forum User
Forum User
Posts: 93
Joined: Sun Feb 13, 2005 2:24 pm
Location: TN

Unread post by kwebdesign »

So, are you saying the stats should be increasing as it autolearns? Because mine is not doing that.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Yes, I suspect its because you're not looking at the right files
kwebdesign
Forum User
Forum User
Posts: 93
Joined: Sun Feb 13, 2005 2:24 pm
Location: TN

Unread post by kwebdesign »

Here's what I'm doing:
# sa-learn --dump magic /var/spool/qscan/.spamassassin
0.000 0 3 0 non-token data: bayes db version
0.000 0 212 0 non-token data: nspam
0.000 0 1899 0 non-token data: nham
0.000 0 82770 0 non-token data: ntokens
0.000 0 963261639 0 non-token data: oldest atime
0.000 0 1211878301 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 count
When I run sa-learn against a handful of spam messages, the second line (212 messages) increases. However, it's not increasing as SA autolearns.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

You might want to double check the user it is running as
exi1ed0ne
Forum Regular
Forum Regular
Posts: 190
Joined: Sun Nov 20, 2005 4:16 pm
Location: Right Behind You!
Contact:

Unread post by exi1ed0ne »

try:

Code: Select all

sa-learn --dump magic --dbpath /var/spool/qscan/.spamassassin
-Andy
kwebdesign
Forum User
Forum User
Posts: 93
Joined: Sun Feb 13, 2005 2:24 pm
Location: TN

Unread post by kwebdesign »

Aha - thanks exi1ed0ne. That revealed something entirely different:
# sa-learn --dump magic --dbpath /var/spool/qscan/.spamassassin
0.000 0 3 0 non-token data: bayes db version
0.000 0 1290838 0 non-token data: nspam
0.000 0 97177 0 non-token data: nham
0.000 0 177340 0 non-token data: ntokens
0.000 0 1211560886 0 non-token data: oldest atime
0.000 0 1211921102 0 non-token data: newest atime
0.000 0 1211921112 0 non-token data: last journal sync atime
0.000 0 1211906518 0 non-token data: last expiry atime
0.000 0 345600 0 non-token data: last expire atime delta
0.000 0 36598 0 non-token data: last expire reduction count
So, it appears that when I run sa-learn manually, it is putting the data in /root/.spamassassin/ instead of /var/spool/qscan/.spamassassin/. Looking at the man pages, it appears that I can specify the db directory when running sa-learn, and that should put the data in the right place.

Scott - after re-reading your previous answers, I realize that's what you were trying to tell me. Sorry - I just mis-understood. Thanks for your help as always!
Post Reply