You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Lightology Postmaster <po...@lightology.com> on 2005/02/09 18:51:52 UTC

sa-learn update global db

I ran sa-learn as root and it created /root/.spamassassin/bayes_seen, bayes_toks and user_prefs file in this folder. How do I make the global spammassassin use this new learned spam because I don't believe is reading this files now.
Or better put how do I train directly the global spammassasin and not just for individual users?

second, how do I tell from the header of a scanned email if it used the bayes filter or better if it user the new learned spam?

Chris V. 

Re: sa-learn update global db

Posted by Kyle Silfer <ky...@alibi.com>.
Lightology Postmaster <po...@lightology.com> said:

> I ran sa-learn as root and it created /root/.spamassassin/bayes_seen,
bayes_toks and user_prefs file in this folder. How do I make the global
spammassassin use this new learned spam because I don't believe is reading
this files now.
> Or better put how do I train directly the global spammassasin and not just
for individual users?

A lot depends on how you are "globally" using SpamAssassin. In my case, I have
a "spamfilter" user which runs SpamAssassin on all incoming mail, so I run
sa-learn as that user, e.g.:

su spamfilter -c '/usr/bin/sa-learn --spam --showdots --dir ./'

In your local.cf file you need to specify the correct directory for this user.
In my case:

bayes_path /home/spamfilter/.spamassassin/bayes

(This is with SpamAssassin 2.64.)

> second, how do I tell from the header of a scanned email if it used the
bayes filter or better if it user the new learned spam?

In this header ...

X-Spam-Status: 	No, hits=2.5 required=4.0 tests=AWL,BAYES_90,CLICK_BELOW
autolearn=no

.. you can clearly see that the Bayes test was run.

The best way to tell if your sa-learn stuff works is to take some uncaught
spam, learn it with sa-learn, then test it again and see how it scores after
it has been added to the Bayes database as spam, e.g.:

spamassassin -t -D < _spam2test/1.

/k

-- 
Kyle Silfer
Systems Manager
NuCity Publications
505.346.0660 x242