andrew.mcmillan.net.nz
cd /var/www; more /dev/rant >>index.html
 
projects


tags
CalDAV Catalyst DAViCal Debian Family FOSS Howto Humour installs ipv6 Kids lca moodle Music N770 Programming Rants RSCDS Travel Ubuntu Web


Recent comments


 

dovecot-antispam goodness

Hi Andrew,

your post inspired me to go off and give CRM114 a try. I've also found what looks like the best way to integrate CRM114 training with IMAP so far, and that's the dovecot-antispam plugin. Functionally equivalent to what your cron scripts do, but does so in real time.

FWIW, here's what I had to to to set it up:

  1. Install CRM114 to ~/crm as per the instructions. The only significant changes I made to the default Debian etch configuration were to remove the ADV/UNS tagging of subjects, since I don't need this.
  2. Create the "crm-spam" and "crm-unsure" folders, for holding SPAM and "unsure" email respectively.
  3. Set up my ~/.mailfilter to filter mail through CRM114:
    xfilter "/usr/bin/crm -u $HOME/crm $HOME/crm/mailreaver.crm"
    if (/^X-CRM114-Status: SPAM/:h)
    to Maildir/.crm-spam/
    if (/^X-CRM114-Status: UNSURE/:h)
    to Maildir/.crm-unsure/
    # [...] At this point we know CRM114 thinks the message is Ham, so we file it as normal
  4. Download and install the dovecot-antispam plugin, and configure it as follows:

    plugin {
    # semicolon-separated list of Trash folders
    antispam_trash = trash;Trash;Deleted Items

    # semicolon-separated list of spam folders
    antispam_spam = crm-spam

    # semicolon-separated list of unsure folders
    antispam_unsure = crm-unsure

    # crm114-exec plugin

    # mailreaver binary
    antispam_crm_binary = /usr/bin/crm

    # semicolon-separated list of extra arguments to crm
    antispam_crm_args = -u;%h/crm;%h/crm/mailreaver.crm

    # NOTE: you need to set the signature for this backend
    antispam_signature = X-CRM114-CacheID
    }

This left me with a setup where:

  • Ham goes to my INBOX, or whichever subfolder I have set in ~/.mailfilter (e.g. for mailing lists).
  • SPAM goes to the crm-spam folder.
  • UNSURE email goes to the crm-unsure folder.
  • To train messages that turn up in the crm-unsure folder, I just move them into the appropriate folder (crm-spam if SPAM or somewhere else if Ham).
  • To retrain Ham misclassified as SPAM, I move it from the crm-spam folder to wherever it belongs.
  • To retrain SPAM misclassified as Ham, I move it from whichever folder it turned up in to the crm-spam folder.

How much easier can it get? :-)

Now to see how well CRM114 does after it's had some serious training.

-mato

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.