On Monday 20 October 2003 11:47 am, Praedor Atrebates wrote:
> Simple question.  Originally I used spamassassin directly from kmail (spamc
> to work through spamd).  Since it was I who was making the call I could
> assume that whenever I did a "sa-learn --spam --dir Mail/Spam/cur" that
> whatever was learned was used in subsequent spam analysis.
>
> Now I use spamd with spamc called from a procmail recipe.  The user is
> "nobody" instead of me.  So, does doing "sa-learn", etc still work?  Does
> user root or nobody make use of the learning I give to spamassassin via
> sa-learn?

If you are sticking mail into a certain directory, you can actually specify 
which directory for it to check when learning messages.  I used to have it 
learn from my "might be spam" folder but since I haven't gotten any of those 
in the last few days, I am currently not "learning" on anything.  Since I was 
running SA process as root, it had access to whatever folder it needed for 
that, you would need to put your spam messages into a folder where "nobody" 
actually has read privileges.

Just create a script like so:

#!/bin/bash

sa-learn --no-rebuild --spam --dir /home/user/Mail/spam/cur
sa-learn --no-rebuild --ham --dir /home/user/Mail/notspam/cur
sa-learn --rebuild

Stick the messages in the appropriate mail folder or add others and run the 
script with a cron job as the user that you run SA as, it will add the 
learning into the root folder of that account.  You can also send a copy of 
the message into a neutral folder and use it for learning.

BTW, it does little good to have SA try to learn on messages that it correctly 
classified.  It already got those.  You should only have it learn on messages 
where it got it wrong, either spam that was not classified as spam or false 
positives that were classified as spam but were not.   Keep in mind that you 
are trying to get it to learn to do what it doesn't do better, not trying to 
get it to learn to do what it already does right better.

-- 
Bryan Phinney
Software Test Engineer


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to