summaryrefslogtreecommitdiffstats
path: root/roles/IMAP/tasks
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-05-14 23:14:25 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:53:28 +0200
commitf7c8011b39044a69daa091ef2c0f7a7aefacb663 (patch)
tree7d6c1a772a33a895a00011c69147b8178529e134 /roles/IMAP/tasks
parent166804e99e33c8ec5760e88ba1f52d4fc301334c (diff)
Upgrade Dovecot config to Jessie.
Diffstat (limited to 'roles/IMAP/tasks')
-rw-r--r--roles/IMAP/tasks/imap.yml17
-rw-r--r--roles/IMAP/tasks/main.yml2
2 files changed, 11 insertions, 8 deletions
diff --git a/roles/IMAP/tasks/imap.yml b/roles/IMAP/tasks/imap.yml
index b142ba6..9365640 100644
--- a/roles/IMAP/tasks/imap.yml
+++ b/roles/IMAP/tasks/imap.yml
@@ -1,46 +1,49 @@
- name: Install Dovecot
apt: pkg={{ item }}
with_items:
- dovecot-core
- dovecot-ldap
- dovecot-imapd
- dovecot-lmtpd
- dovecot-antispam
- dovecot-managesieved
- dovecot-sieve
- name: Create a user 'vmail'
user: name=vmail system=yes
createhome=no
home=/home/mail
shell=/bin/false
password=!
state=present
-# Required for dbox, see
-# http://wiki2.dovecot.org/MailboxFormat/dbox#Multi-dbox
-- name: Create a nightly cron job to purge expunged messages
- cron: name="Purge expunged messages"
- minute=7 hour=5
- user=vmail cron_file=doveadm-purge
- job="/usr/bin/doveadm purge -A"
+## TODO: make a LDAP query listing all users using iterate_attrs and
+## iterate_filter. (Alternatively, use a dict, see
+## https://www.opensource.apple.com/source/dovecot/dovecot-293/dovecot.Config/dovecot-dict-auth.conf.ext)
+## Required for dbox, see
+## http://wiki2.dovecot.org/MailboxFormat/dbox#Multi-dbox
+#- name: Create a nightly cron job to purge expunged messages
+# cron: name="Purge expunged messages"
+# minute=7 hour=5
+# user=vmail cron_file=doveadm-purge
+# job="/usr/bin/doveadm purge -A"
# The ownership and permissions ensure that dovecot won't try to
# deliver mails under an umounted mountpoint.
- name: Create a home directory for user 'vmail'
file: path=/home/mail
state=directory
owner=root group=root
mode=0755
- name: Create /home/mail/virtual
file: path=/home/mail/virtual
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
diff --git a/roles/IMAP/tasks/main.yml b/roles/IMAP/tasks/main.yml
index c6fbbd9..9ed2ea6 100644
--- a/roles/IMAP/tasks/main.yml
+++ b/roles/IMAP/tasks/main.yml
@@ -1,4 +1,4 @@
---
- include: imap.yml tags=imap,dovecot
- include: mda.yml tags=mda,mail,postfix
-- include: spam.yml tags=spam,spamassassin
+#- include: spam.yml tags=spam,spamassassin # TODO spam filter