diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2013-12-11 00:56:02 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:51:20 +0200 |
commit | 025db13070cabde62aed0b9c694baaaa4538b205 (patch) | |
tree | dba9185af69d65282fc061c54dc2306e732cdb17 /roles/IMAP/tasks | |
parent | 50df1556816e118b4bc449aaa7dfbab7a2ead626 (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/tasks')
-rw-r--r-- | roles/IMAP/tasks/imap.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/IMAP/tasks/imap.yml b/roles/IMAP/tasks/imap.yml index d8bb352..e39e4bf 100644 --- a/roles/IMAP/tasks/imap.yml +++ b/roles/IMAP/tasks/imap.yml @@ -1,68 +1,80 @@ - name: Install Dovecot apt: pkg={{ item }} with_items: - dovecot-core - dovecot-ldap - dovecot-imapd - dovecot-lmtpd + - dovecot-antispam - name: Create a user 'vmail' user: name=vmail system=yes home=/home/mail shell=/bin/false password=! state=present - name: Create a home directory for user 'vmail' file: path=/home/mail state=directory owner=vmail group=vmail mode=0700 - name: Create virtual mailbox directories file: path=/etc/dovecot/virtual{{ item }} state=directory owner=root group=root mode=0755 with_items: - / - /all - /flagged - /recent - /unseen - name: Create virtual mailboxes copy: src=etc/dovecot/virtual/{{ item }}/dovecot-virtual dest=/etc/dovecot/virtual/{{ item }}/dovecot-virtual owner=root group=root mode=0644 with_items: - all - flagged - recent - unseen +- name: Create directory /home/mail/spamspool + # There is no possibility for a name clash, since 'spamspool' isn't a + # valid domain + file: path=/home/mail/spamspool + state=directory + owner=vmail group=vmail + mode=0700 + - name: Configure Dovecot copy: src=etc/dovecot/{{ item }} dest=/etc/dovecot/{{ item }} owner=root group=root mode=0644 register: r with_items: - conf.d/10-auth.conf - conf.d/10-logging.conf - conf.d/10-mail.conf - conf.d/10-master.conf - conf.d/10-ssl.conf - conf.d/15-mailboxes.conf + - conf.d/20-imap.conf - conf.d/20-lmtp.conf + - conf.d/90-plugin.conf - conf.d/auth-ldap.conf.ext - dovecot-ldap.conf.ext + - dovecot-ldap-userdb.conf.ext notify: - Restart Dovecot - name: Start Dovecot service: name=dovecot state=started when: not r.changed - meta: flush_handlers |