On Thu, Feb 26, 2004 at 06:26:58AM -0600, Matthew Hunter wrote:
> On Thu, Feb 26, 2004 at 12:10:53PM +0000, Martin Hepworth <[EMAIL PROTECTED]> 
> wrote:
> > I front end the maildirs with an imap server, so I run a small perl 
> > script to login to the imap server and dig out the messages from there.
> 
> This is unncessary.  
> 
> The maildir format stores messages in ./new and ./cur within the 
> maildir.  So, simply pass in both of those directories to 
> sa-learn, rather than the top-level directory.  This is how I 
> have been doing it, and it seems to be working fine.  
> 
> I would, however, appreciate it if sa-learn could recognize a 
> maildir and do the same automatically.  Or perhaps even 
> recursively, because I have a maildir heirarchy, and learning 
> from everything in that requires a bit of shell magic.

I use this script to collect spamfeed from another computer and feed
it to sa-learn on the server:

#!/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/


Regards
Johann

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

     "But God commendeth his love toward us, in that, while 
      we were yet sinners, Christ died for us."         
                                   Romans 5:8 

Reply via email to