On 04/20/2014 03:14 PM, Dan Mahoney, System Admin wrote:
All,
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?
-Dan
I have three Maildir folders set up which IMAP point do for the users,
and generate those with /etc/skel for new users. SPAM/Spam-Missed is for
user selected spam that wasn't sent to SPAM/Spam-Mail folder,
SPAM/Spam-Mail is for SA marked spam and is moved with a default
procmail file also from /etc/skel. SPAM/Spam-Ham is user selected
non-SPAM messages that made it to SPAM/Spam-Mail.
Then I have a folder config file set up for sa-learn to load:
root@omega:/etc/spamassassin# cat sa-learn-folders.conf
spam:dir:/home/*/Maildir/.SPAM.Spam-Missed/{cur,new}
spam:dir:/home/*/Maildir/.SPAM.Spam-Mail/{cur,new}
ham:dir:/home/*/Maildir/.SPAM.Spam-Ham/{cur,new}
root@omega:/etc/spamassassin#
Then I have a cron call to sa-learn
root@omega:/etc/cron.d# more sa-learn
# Cron entry for sa-learn
MAILTO=root@localhost
0 * * * * root /usr/bin/sa-learn --username=Debian-exim --no-sync
--dbpath=/var/spool/exim4/.spamassassin/bayes -
-folders=/etc/spamassassin/sa-learn-folders.conf >>
/var/log/sa-learn-run.log
root@omega:/etc/cron.d#
--
-James