dovecot dspam plugin

flattr this!

I’ve found the dovecot dspam plugin and looked at the code. It forks and calls the dspam binary directly for every mail. I didn’t like this behavior, so
I’ve migrated it to use libdspam and added support to configure it using variables in dovecot.conf.

This is the dovecot dspam plugin that watches a special folder, the SPAM folder. When the MTA delivers a message to the user, it’ll first run it through the spam classifier. If it is classified as spam, it’ll be delivered to the SPAM folder instead of the normal filtering file the user may have (maildrop, sieve). Now the user has everything classified as spam in his SPAM folder. Everything else wherever the users wants it.

This is not enough cause our spam scanner needs training. We’ll occasionally have false positives and false negatives. Now this is the point where the dovecot dspam plugin comes into play. Instead of moving mail into special folders, the user has two actions available:

  1. moving it out of the SPAM folder and
  2. moving it into the SPAM folder.

The dovecot plugin watches these actions (and additionally prohibits APPENDs to the SPAM folder, more for technical reasons than others) and tells dspam that it made an error and needs to re-classify the message, depending on which of the two actions the user did. The user can now move the message directly into whatever folder the user chooses, and it all works.

*UPDATE*

Johannes has written a new plugin and we have merged pieces of the code, please check:

http://johannes.sipsolutions.net/Projects/dovecot-antispam

5 thoughts on dovecot dspam plugin

  1. This is very interesting but I can’t clone repo:

    $ git clone git://git.cynapses.org/gladiac/dovecot-dspam-plugin
    Initialized empty Git repository in /home/enp/alt-devel/git/dovecot-dspam-plugin/.git/
    git.cynapses.org[0: 213.239.217.124]: errno=Connection refused
    fatal: unable to connect a socket (Connection refused)
    fetch-pack from ‘git://git.cynapses.org/gladiac/dovecot-dspam-plugin’ failed.

    $ ping git.cynapses.org
    PING git.cynapses.org (213.239.217.124) 56(84) bytes of data.
    64 bytes from milliways.cynapses.org (213.239.217.124): icmp_seq=1 ttl=49 time=113 ms

    Can I download sources in any way?

  2. i have a bug :(

    make install
    cc -DHAVE_CONFIG_H -I/opt/dovecot/include/ -I/opt/dovecot/include/src/ -I/opt/dovecot/include/src/lib/ -I/opt/dovecot/include/src/lib-storage/ -I/opt/dovecot/include/src/lib-mail/ -I/opt/dovecot/include/src/lib-imap/ -I/opt/dovecot/include/src/lib-dict/ -I/opt/dovecot/include/src/lib-index/ -I/opt/dovecot/include/src/imap/ -o dovecot-version dovecot-version.c
    dovecot-version.c:4:20: erreur: config.h : Aucun fichier ou r?pertoire de ce type
    dovecot-version.c: In function ‘main':
    dovecot-version.c:8: erreur: ‘PACKAGE_STRING’ undeclared (first use in this function)
    dovecot-version.c:8: erreur: (Each undeclared identifier is reported only once
    dovecot-version.c:8: erreur: for each function it appears in.)
    make: *** [dovecot-version] Erreur 1

Leave a Reply


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post comment

What is Persona?