From ed152395737dc411c4d9fef32b54e2008ba4c31f Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 27 Jun 2014 06:19:53 +0200 Subject: 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. --- roles/IMAP/tasks/imap.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'roles/IMAP') 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 }} -- cgit v1.2.3