You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Nigel Frankcom <ni...@blue-canoe.net> on 2006/11/13 11:06:18 UTC

Re: Confirmation about sa-learn

On Mon, 13 Nov 2006 10:49:11 +0100, Cedric BUSCHINI
<cb...@carax.com> wrote:

>Hello List, 
>
>I d just like to have a confirmation about how to use sa-learn. 
>
>1 - create a directory containing spams (mails tagged as spam and mails not tagged as spam but which are real spams)  
>2 - create a directory containing hams (mails not tagged as spam and which are not spam at all and mails tagged as spam which aren't spams) 
>3 - run the sa-learn script on the spam dir with --spam option. 
>4 - run the sa-learn script on the ham dir with -- ham option. 
>
>Thanks and sorry for that newbie question ... 
>

Yep - that looks about right though you'll need to add the SA username
you are training under (see below). 

I have a directory called /downloads/ham and another /downloads/spam I
use Filezilla with sftp to drop any ham (or mislabeled spam) into the
/ham dir and any spam or mislabeled ham into the /spam dir.

In my /root directory I have 3 scripts ham, spam and hamspam (they are
sat in the /root dir since that's the 1st stop when I login with
PuTTY.

It's then a case of running ./ham or ./spam or ./hamspam.

The ham script contains...
sa-learn --ham -u <mySAusername> /downloads/ham && rm -fv
/downloads/ham/*

The spam script contains...
sa-learn --spam -u <mySAusername> /downloads/spam && rm -fv
/downloads/spam/*


The hamspam script contains....
sa-learn --ham -u <mySAusername> /downloads/ham && sa-learn --spam -u
<mySAusername> /downloads/spam && rm -fv /downloads/ham/* && rm -fv
/downloads/spam/*

Between them they train in the ha/spam and clean up after themselves.

HTH

Nigel

Re: Confirmation about sa-learn

Posted by Matt Kettler <mk...@verizon.net>.
Nigel Frankcom wrote:
> On Mon, 13 Nov 2006 10:49:11 +0100, Cedric BUSCHINI
> <cb...@carax.com> wrote:
>
>   
>> Hello List, 
>>
>> I d just like to have a confirmation about how to use sa-learn. 
>>
>> 1 - create a directory containing spams (mails tagged as spam and mails not tagged as spam but which are real spams)  
>> 2 - create a directory containing hams (mails not tagged as spam and which are not spam at all and mails tagged as spam which aren't spams) 
>> 3 - run the sa-learn script on the spam dir with --spam option. 
>> 4 - run the sa-learn script on the ham dir with -- ham option. 
>>
>> Thanks and sorry for that newbie question ... 
>>
>>     
>
> Yep - that looks about right though you'll need to add the SA username
> you are training under (see below). 
>   
Warning: sa-learn -u only works for folks who are using SQL storage for
bayes. It does not work if you're using real home directories and
Berkeley DB files.

If you're using Berkley DB's, you've got to use su.
> The ham script contains...
> sa-learn --ham -u <mySAusername> /downloads/ham && rm -fv
> /downloads/ham/*
>
>