summaryrefslogtreecommitdiffstats
path: root/roles/IMAP
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2014-06-27 06:19:53 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:51:58 +0200
commited152395737dc411c4d9fef32b54e2008ba4c31f (patch)
treeba6de89b7d319bec7ac48586b4a91405d4234c34 /roles/IMAP
parenta8a4d198906e27a9183b1eba6c6c72fdbd390963 (diff)
chown root:root /home/mail && chmod 0755 /home/mail
This ensures that Dovecot won't deliver messages if the disk hasn't been mounted, for instance.
Diffstat (limited to 'roles/IMAP')
-rw-r--r--roles/IMAP/tasks/imap.yml6
1 files changed, 4 insertions, 2 deletions
diff --git a/roles/IMAP/tasks/imap.yml b/roles/IMAP/tasks/imap.yml
index 67c2bcc..e1f005d 100644
--- a/roles/IMAP/tasks/imap.yml
+++ b/roles/IMAP/tasks/imap.yml
@@ -19,8 +19,10 @@
- name: Create a home directory for user 'vmail'
file: path=/home/mail
state=directory
- owner=vmail group=vmail
- mode=0700
+ # The ownership and permissions ensure that dovecot won't try to
+ # deliver mails under an umounted mountpoint.
+ owner=root group=root
+ mode=0755
- name: Create virtual mailbox directories
file: path=/etc/dovecot/virtual/{{ item }}