From: Craig McLean [mailto:[EMAIL PROTECTED]
> 
> In addition to all the good responses you've had I would add that if
> you keep the spam after learning, as I do (in case the bayes DB get
> killed) then it can sometimes take a while for sa-learn to finish,
> even though it will skip messages it has already seen.  I learn from
> 5 mailboxes (ham and spam) and recently hit a problem where one
> sa-learn had not finished by the time the next one started, and
> failed because the DB (using file-based db) was locked.

What I would do is something like this (untested):

    TEMPDIR=`mktemp -d`
    mv /spam/mailbox/dir/* $TEMPDIR
    sa-learn --spam $TEMPDIR
    mv $TEMPDIR/* /spam/archive/dir/
    rmdir $TEMPDIR

1) Move the messages to a temporary directory so you don't have to worry
about new stuff coming in while you're working.
2) Run sa-learn on the temporary directory.
3) Move the learned mail to an archive directory for holding

This way sa-learn does not have to continually parse the list of
messages that it has already learned and all of the old messages are
still available for re-learning if you need to rebuild the database.

Bowie

Reply via email to