summaryrefslogtreecommitdiffstats
path: root/roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2013-12-11 00:56:02 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:51:20 +0200
commit025db13070cabde62aed0b9c694baaaa4538b205 (patch)
treedba9185af69d65282fc061c54dc2306e732cdb17 /roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf
parent50df1556816e118b4bc449aaa7dfbab7a2ead626 (diff)
Configure dovecot's antispam filter.
Mails to be retrained are stored in the spooldir /home/mail/spamspool; later a daemon catches them up and feed them to sa-learn(1p). (On busy systems batch-process the learning should be much more efficient.) The folder transisition matrix along with the corresponding actions can be found there: http://hg.dovecot.org/dovecot-antispam-plugin/raw-file/5ebc6aae4d7c/doc/dovecot-antispam.7.txt See also dovecot-antispam(7).
Diffstat (limited to 'roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf')
-rw-r--r--roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf21
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf b/roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf
new file mode 100644
index 0000000..6e60f0f
--- /dev/null
+++ b/roles/IMAP/files/etc/dovecot/conf.d/90-plugin.conf
@@ -0,0 +1,21 @@
+##
+## Plugin settings
+##
+
+# All wanted plugins must be listed in mail_plugins setting before any of the
+# settings take effect. See <doc/wiki/Plugins.txt> for list of plugins and
+# their configuration. Note that %variable expansion is done for all values.
+
+plugin {
+ antispam_backend = spool2dir
+
+ antispam_trash = TRASH
+ antispam_unsure_pattern_ignorecase = MailTrain;MailTrain/*
+ antispam_spam = SPAM
+
+ # The first %%lu is replaced by the current time.
+ # The second %%lu is replaced by a counter to generate unique names.
+ # These two tokens MUST be present in the template!
+ antispam_spool2dir_spam = /home/mail/spamspool/%u-%%10lu-%%06lu.spam
+ antispam_spool2dir_notspam = /home/mail/spamspool/%u-%%10lu-%%06lu.ham
+}