Dovecot Anti-Spam Plugin

The antispam plugin allows you to retrain the spam filter by simply moving emails in and out of the Spam folder.

cd /extra/src
wget -O dovecot-antispam-plugin.tar.gz http://hg.dovecot.org/dovecot-antispam-plugin/archive/tip.tar.gz
tar zxf dovecot-antispam-plugin.tar.gz
cd dovecot-antispam-plugin-5ebc6aae4d7c

Configure and build it:

ACLOCAL='aclocal -I /usr/local/share/aclocal' ./autogen.sh
./configure --prefix=/usr/local
make
make install

To configure it, edit /usr/local/etc/dovecot/conf.d/90-plugin.conf:

antispam_backend = dspam
antispam_spam = Spam.MissedSpam
antispam_trash = trash;Trash;Deleted Items;Deleted Messages
antispam_dspam_binary = /usr/local/bin/dspam
antispam_signature = X-DSPAM-Signature

To enable the plugin, edit /usr/local/etc/dovecot/conf.d/20-imap.conf and add it to the mail_plugins list:

protocol imap {
  mail_plugins = $mail_plugins antispam
}

To enable debugging, add to /usr/local/etc/dovecot/conf.d/90-plugin.conf:

antispam_debug_target = stdout
antispam_verbose_debug = 1

Credits

Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.

Recent Updates

  • 5 months 1 week ago
  • 5 months 1 week ago
  • 5 months 1 week ago
    php 8.x
  • 5 months 1 week ago
    10.6.7
  • 5 months 2 weeks ago
    Drop Centos 5/6 stuff