Shane Hathaway wrote:
> I have a small mail server used by about a dozen family members.  I'd
> like to set up a bayesian spam filter on the server and make it easy for
> users to train their personal filters.  For a long while, I've wondered
> how to make the training easy, but today it finally hit me: just have
> the users put spam in a designated IMAP folder and "ham" in a different
> folder.  Then re-train at night if the users have changed the ham or
> spam folders during the day.
> 
> Before I go off and do this, has anyone else tried the same thing?  Was
> it effective and easy to use?

Yes, it works great. We use it on a LOT of servers. Another nice thing is
you can configure Thunderbird to send junk it detects (that SpamAssassin
doesn't catch) into that folder for nightly training.

Here's the nightly script we wrote to do this:

#!/bin/sh

for USER in `ls /home`
do
    #look for a spam-mail file in $USER's mail directory
    if [ -f /home/$USER/mail/spam-mail ]
    then
        echo "Checking spam for $USER ..."
        su $USER -c "sa-learn --spam --mbox /home/$USER/mail/spam-mail"
        cp /dev/null /home/$USER/mail/spam-mail
    fi
done

-- 
[EMAIL PROTECTED] is Doran L. Barton, president/CTO, Iodynamics LLC
Iodynamics: IT and Web services by Linux/Open Source specialists
 "Please leave your values at the front desk."
    -- Seen in a Paris hotel elevator

Attachment: signature.asc
Description: OpenPGP digital signature

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to