Hi Patrick,
I have implemented this script as you suggested. It looks like just the ticket.
I created an IMAP folder called LearnAsSpam and I dropped a few spams in it.
I then went to the SME command line...as root...and ran this command to test:
perl /usr/bin/LearnAsSpam.pl
It seems to learn the spams, though I'm not really sure.
Learning Spammail: /home/e-smith/files/users/gcooper/Maildir/.LearnAsSpam/cur/1150381198.P23845Q20M668252.mail\:2,S
Result of sa-learn:
Result of delete:
I looked for some evidence by running:
sa-learn -D --dump magic
But it terminated with this:
debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
ERROR: Bayes dump returned an error, please re-run with -D for more information
Do you have any idea how I could verify the learning is working or how I should tweak the script to delete the processed messages?
Thanks much,
G