diff options
Diffstat (limited to 'roles/IMAP-proxy')
-rw-r--r-- | roles/IMAP-proxy/tasks/main.yml | 14 | ||||
-rw-r--r-- | roles/IMAP-proxy/templates/etc/dovecot/conf.d/20-imapc.conf.j2 (renamed from roles/IMAP-proxy/files/etc/dovecot/conf.d/20-imapc.conf) | 9 | ||||
-rw-r--r-- | roles/IMAP-proxy/templates/etc/dovecot/conf.d/auth-imap.conf.ext.j2 (renamed from roles/IMAP-proxy/files/etc/dovecot/conf.d/auth-imap.conf.ext) | 2 |
3 files changed, 18 insertions, 7 deletions
diff --git a/roles/IMAP-proxy/tasks/main.yml b/roles/IMAP-proxy/tasks/main.yml index 579fc7e..93a5181 100644 --- a/roles/IMAP-proxy/tasks/main.yml +++ b/roles/IMAP-proxy/tasks/main.yml @@ -24,13 +24,23 @@ dest=/etc/dovecot/conf.d/{{ item }} owner=root group=root mode=0644 - register: r + register: r1 with_items: - 10-auth.conf - 10-logging.conf - 10-mail.conf - 10-master.conf - 15-mailboxes.conf + notify: + - Restart Dovecot + +- name: Configure Dovecot (2) + template: src=etc/dovecot/conf.d/{{ item }}.j2 + dest=/etc/dovecot/conf.d/{{ item }} + owner=root group=root + mode=0644 + register: r2 + with_items: - 20-imapc.conf - auth-imap.conf.ext notify: @@ -38,7 +48,7 @@ - name: Start Dovecot service: name=dovecot state=started - when: not r.changed + when: not (r1.changed or r2.changed) - meta: flush_handlers diff --git a/roles/IMAP-proxy/files/etc/dovecot/conf.d/20-imapc.conf b/roles/IMAP-proxy/templates/etc/dovecot/conf.d/20-imapc.conf.j2 index 4c1cf8f..39dbbd6 100644 --- a/roles/IMAP-proxy/files/etc/dovecot/conf.d/20-imapc.conf +++ b/roles/IMAP-proxy/templates/etc/dovecot/conf.d/20-imapc.conf.j2 @@ -2,16 +2,17 @@ # # http://dovecot.org/pipermail/dovecot/2011-January/056975.html # http://wiki2.dovecot.org/HowTo/ImapcProxy +# http://wiki2.dovecot.org/MailboxFormat/imapc # http://wiki2.dovecot.org/Migration/Dsync -imapc_host = localhost -imapc_port = 993 +imapc_host = {{ ipsec[imapsvr.inventory_hostname_short] }} +imapc_port = 143 # Read multiple mails in parallel, improves performance mail_prefetch_count = 25 -# The list of valid features can be found there -# http://hg.dovecot.org/dovecot-2.2/file/tip/src/lib-storage/index/imapc/imapc-settings.c +# The list of valid features can be found at +# https://github.com/dovecot/core/blob/master/src/lib-storage/index/imapc/imapc-settings.c # (in the struct 'imapc_feature_list imapc_feature_list') imapc_features = rfc822.size fetch-headers #imapc_features = rfc822.size fetch-headers search diff --git a/roles/IMAP-proxy/files/etc/dovecot/conf.d/auth-imap.conf.ext b/roles/IMAP-proxy/templates/etc/dovecot/conf.d/auth-imap.conf.ext.j2 index ced2f80..30b8d7f 100644 --- a/roles/IMAP-proxy/files/etc/dovecot/conf.d/auth-imap.conf.ext +++ b/roles/IMAP-proxy/templates/etc/dovecot/conf.d/auth-imap.conf.ext.j2 @@ -4,7 +4,7 @@ passdb { driver = imap - args = host=localhost port=993 + args = host={{ ipsec[imapsvr.inventory_hostname_short] }} port=143 default_fields = userdb_imapc_password=%w } |