This is exactly the kind of starting point I needed to get me to get in
gear and write something similar for my system. For me however, I am
using the std UWash based IMAP and a few other differences but the
important difference/addition is that I want to automatically train my
users emails accross all of their boxes including inbox and train on
junk that gets picked up but not auto learned. This way things that
pass the spam test but do not get auto trained will get picked up and
trained and vice versa. Even if some things are falsely trained on
because the script ran before they manually classified their FP/FN
mail, when they use the FP/FN boxes sa-learn is smart enough to relearn
things so this should work. When I get the script done I will post it
back for you to merge in with yours. Thanks, Tom Rubin Bennett wrote: Hello all... I figure I've asked enough questions of this list that it's about time I gave something back... You may not want it,but here it is anyway :)I've written a bash script that takes will run sa-learn against the administrator specified False-Postive and False-Negative folders. Run this script from cron, and have your users drag n' drop emails that get misclassified by SA to the appropriate folders. The script will act in 2 ways: 1.) Run it as root, and it will parse the administrator specified USERLIST and run the internally defined autoLearn() function as each user. 2.) Run it as an ordinary user and it will only learn from that user's email. I wrote it this way so that I could have a wrapper around sa-learn that would make sure that the directories exist, create them if they don't using maildirmake++, and not try to learn from directories with no messages in them. This is written to work with Courier IMAP and Maildir; I have not tried it with anything else. Someday I may get around to rewriting it in php and using php-imap to do the moving around etc, but as a dirty hack this works ok. It also doesn't need passwords etc. in config files... I hope this benefits someone out there... if there's enough interest, I'll put it on my website and do a proper CVS for it. If anyone has ideas for making it better (or suck less), let me know. Patches are always welcome... |
- SA-Learn script Rubin Bennett
- Re: SA-Learn script Nix
- Re: SA-Learn script Thomas Bolioli
- Re: SA-Learn script Thomas Bolioli