On Fri, Feb 27, 2004 at 10:49:03AM +0000, Chris Withers <[EMAIL PROTECTED]> 
wrote:
> Matthew Hunter wrote:
> >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.  
> Hmm, I noticed it "learned" from two messages, even for empty maildirs, so 
> I suspect here may be a couple of non-message files lying in there :-S

The maildir spec allows metafiles to be stored in the top level 
directory.  Many IMAP servers store message data indexes there, 
for example.  

> >Or perhaps even 
> >recursively, because I have a maildir heirarchy, and learning 
> >from everything in that requires a bit of shell magic.
> Hear hear hear hear :-)

FWIW, here's how I learn currently (learning from all read 
messages, except known spam, and mailing lists dealing with 
spam):

find /home/matthew/Maildir/ -type d -name "cur" | grep -v -i spam | xargs 
--max-args=1 -t sa-learn --no-rebuild --ham
sa-learn --showdots --no-rebuild --spam 
/home/matthew/Maildir/.Personal/.Spam/cur
sa-learn --rebuild

It would probably be more efficient to use a temporary store and 
delete the message after learning, rather than counting on SA to 
skip messages it has already seen, but I haven't thought that 
through yet.

-- 
Matthew Hunter ([EMAIL PROTECTED])
Public Key: http://matthew.infodancer.org/public_key.txt
Homepage: http://matthew.infodancer.org/index.jsp
Politics: http://www.triggerfinger.org/index.jsp

Reply via email to