I know it's been a couple weeks since I asked the question, but I wanted
to thank those of you who responded. I ended up writing a shell script
(example included below). I run it every day in a cron job.
Yeah I know it's not perfect but it's a good place to start. The main
thing was being reminded about grep having not used it for the last 5 or
so years in windows-land. In case anybody's wondering, I have procmail
move suspected spam into spam/probably_spam and then the couple of us
using this computer move our email into spam/definitely_spam when we
clean out that mailbox.
- Andrew.
echo 'learning inbox as ham...'
sa-learn --ham --showdots --mbox /var/mail/aclarke
echo
echo 'learning other folders as ham...'
sa-learn --ham --showdots --mbox `find /home/aclarke/mail | grep
'<non-spam folder regex>'`
echo
echo 'learning spam...'
sa-learn --spam --showdots --mbox `find /home/aclarke/mail | grep
'definitely_spam\|missed_spam'`
echo
echo 'Re-learning incorrectly learned spam...'
sa-learn --ham --showdots --mbox /home/aclarke/mail/spam/not_spam
echo
echo 'Deleting mail from temporary spam mailboxes...'
cp /home/aclarke/blank_mail_folder
/home/aclarke/mail/spam/definitely_spam
cp /home/aclarke/blank_mail_folder /home/aclarke/mail/spam/not_spam
echo
echo 'Done!'
On Sat, 2003-08-16 at 14:43, Eric Veltman wrote:
> Hello Andrew,
>
> On Saturday 16 August 2003 22:29, Andrew Clarke wrote:
> > I have multiple mailboxes in ~/mail, as do the other users on my server.
> > ~/mail/spam/definitely_spam is an mbox that contains, well, spam. If I
> > run:
> >
> > sa-learn --ham --mbox /home/someuser/mail/*
> >
> > it will autolearn the spam/definitely_spam mailbox as ham, which I
> > obviously don't want. I can think of 2 workarounds:
>
> You can use a shell script or for instance this 'find' syntax :
>
> find /home/someuser/mail \
> -type f ! -name "definitely_spam" \
> -exec sa-learn --ham --mbox {} \;
>
> sa-learn --spam --mbox /home/someuser/mail/spam/definitely_spam
>
> Best regards,
>
> Eric Veltman
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk