> If you have access to the /etc/mail/spamassassin/local.cf file (may be 
> in a different directory according to how SA is called), then you can 
> add the parameter
> > bayes_auto_learn 1

Hey cool, done that now.  Just looked at the headers of a message received
which says "autolearn=ham"
This was a message from the SA group funnily enough - presumably that is
correct?

I managed to get sa-learn to work for a non-root account by deleting the
bayes* files as you suggested.
Presumably the bayes database applies then to any [EMAIL PROTECTED] for the 
userid
I run it under?

I've had a look at your script and it's given me some ideas thanks - I have
written a script which will look for all files called learn_spam or
learn_ham and run sa-learn on them, then "empties" the files by removing
them and touching them (is there a better way?)

I know nothing about shell programming other than what I have picked up from
Bob's script and google, so forgive if it's a little rough around the edges
- is my first ever shell script!:

====================================
#!/bin/sh
if [ $1 -eq "d" ] ; then
        SARGS="--showdots"
fi

echo "Learning SPAM"
for FILE in `find $HOME -name learn_spam -print` do
        echo "Processing $FILE"
        sa-learn --spam --mbox $FILE $SARGS
        rm $FILE
        touch $FILE
done

echo "Learning HAM"
for FILE in `find $HOME -name learn_ham -print` do
        echo "Processing $FILE"
        sa-learn --ham --mbox $FILE $SARGS
        rm $FILE
        touch $FILE
done
echo "Done"
====================================

Any obvious flaws there guys, or something I could do better?   It *seems*
to work okay anyway.
Should I bung them all into one file first????

The other thing is, how often should I run it - I've seen it mentioned
before that you need about 200 spams and 200 hams for sa-learn to be
effective - does this mean 200 _per run_ or that you need to have learned
about that number in total for it to be effective?
If the former, then presumably my script would be better off contatenating
the spam and ham files before passing them to a single run of sa-learn?

> I like salt-free sunflower seeds...

They're on their way!

Cheers,


Tony


Reply via email to