diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2013-12-10 20:45:22 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:51:19 +0200 |
commit | 50df1556816e118b4bc449aaa7dfbab7a2ead626 (patch) | |
tree | 48139c6e2e38b1e6ca769d93b2d38b2498256906 /roles/IMAP/tasks | |
parent | 5eedb4087bda5b16697e02f494c928dac1179364 (diff) |
Enable IMAP virtual mailboxes.
Using dovecot's 'virtual' plugin, cf.
http://wiki2.dovecot.org/Plugins/Virtual
The 'virtual/' namespace is visible in the NAMESPACE command
(hidden=no), but not in LIST (list=no). This should ensure that the
namespace isn't automatically synced by offlineimap, but nevertheless
visible by roundcube, cf.
http://trac.roundcube.net/ticket/1486796
http://mailman2.u.washington.edu/pipermail/imap-protocol/2010-May/001076.html
Diffstat (limited to 'roles/IMAP/tasks')
-rw-r--r-- | roles/IMAP/tasks/imap.yml | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/roles/IMAP/tasks/imap.yml b/roles/IMAP/tasks/imap.yml index 554bc67..d8bb352 100644 --- a/roles/IMAP/tasks/imap.yml +++ b/roles/IMAP/tasks/imap.yml @@ -13,15 +13,34 @@ password=! state=present -- name: Create directories for user 'vmail' - file: path=/home/mail{{ item }} - owner=vmail group=vmail +- 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: - / - - /mailboxes - - /sieve + - /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: Configure Dovecot copy: src=etc/dovecot/{{ item }} |