On Tue, Nov 11, 2003 at 09:39:42AM +0000, Martyn Drake wrote:

> I was wondering how I can use sa-learn to train a system-wide Bayesian 
> database?  The way I've set-up SA at the moment is that each user has a 
> .forward file which runs "|/usr/bin/procmail -f-" and that in turn reads 
>  the .procmailrc file containing the recipie to forward the mail to 
> spamc.  Thus each user has their own set of databases and configuration 
> files.
> 
> I want to be able to submit emails to sa-learn so that it applies to 
> everybody's database.  I'm just not sure having read the documentation 
> how I can do this..

We are in a testing phase and this is what I do:

I have three mail servers where spamd runs as user spamd.  We scan
126 user's email at this stage (out of about 18000) and some of them
send back messages which they see as spam and that was not marked as
spam by spamasassin or false positives.  I have asked them to send it
to me by forwarding the mail as attachment in order to contain the
headers.

I then save the attached emails in a maildir named "nuwespam" and
false positives in "ham".  I use the following script on each of the
mailservers (running as spamd) to collect these mails every day and
feed them to sa-learn:

#!/bin/sh

cd /home/spamd
rsync -e ssh -rva --exclude hcache.db [EMAIL PROTECTED]:/home/js/Mail/nuwespam/ 
/home/spamd/spam/
rsync -e ssh -rva --exclude hcache.db [EMAIL PROTECTED]:/home/js/Mail/ham/
/home/spamd/ham/
sa-learn --spam --dir spam/cur/
sa-learn --spam --dir spam/new/
sa-learn --ham --dir ham/cur/
sa-learn --ham --dir ham/new/
rm -rf spam/
rm -rf ham/

and then I delete nuwespam and ham on my computer using a cronjob
after the mails have been fed to sa-learn.

I am still looking for a utility which can extract those attachments
into seperate messages.  At the moment I am doing it by hand.  I will
probably write something to do it automatically.

Regards
Johann
-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     "Therefore, my beloved brethren, be ye stedfast, 
      unmoveable, always abounding in the work of the Lord, 
      forasmuch as ye know that your labour is not in vain 
      in the Lord."    1 Corinthians 15:58 


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to