--As of April 20, 2014 12:14:37 PM -0700, Dan Mahoney, System Admin is
alleged to have said:
Most of my users aren't command-line friendly. I'd like to basically
have my IMAP server default to handing out two imap mailboxes that get
auto-crontabbed to training bayes.
Ideally, I'd also like to make it so that things dropped in the
learn_spam folder are deleted, and stuff in the learn_ham folder
(mistake-based training) are de-tagged and moved back to the inbox.
Alternatively, a single "learned" folder would do.
Perl's Mail::Box seems like a heavy tool for this simple task. Does
anyone else have any recommendations?
--As for the rest, it is mine.
You might find this script helpful:
<https://github.com/DanStaal/Arcfind>
I wrote it ages ago for my own use to help in doing basically what you are
asking for. I found that my IMAP server had a bad habit of auto-deleting
newly emptied directories, so I wanted to always leave at least one message
in the 'learn as spam' folder.
I use it with Maildir folders: the invocation is usually along the lines of
'mv `arcfind /mail/source/dir/cur/` /mail/dest/dir/cur/'
It doesn't feed to spamassassin itself, but a separate cronjob of
'sa-learn' works just fine.
Daniel T. Staal
(I'm planning on putting it on CPAN as well, though I'm still considering
the name and I need to fix some of the docs. The main page README is
correct, I just don't have the module versions documented fully yet.)
---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------