diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2013-12-16 04:29:55 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:51:29 +0200 |
commit | 522ba399d24e8166681b328f550904fcd4d8fad9 (patch) | |
tree | 0686ea8ab3271872d2ab15079fb53ef52b778090 /roles/IMAP-proxy/tasks | |
parent | de0914bf8105fa8c281a326e6e3e4e3f211bb0f3 (diff) |
Use a local IMAP caching proxy under the webmail.
(Unless the webmail is itself a full IMAP server.) It replaces
RoundCube's own IMAP and message caches.
Dovecot's IMAPC storage backend is not very documented, but provides
smart IMAP proxying. References include:
http://dovecot.org/pipermail/dovecot/2011-January/056975.html
http://wiki2.dovecot.org/HowTo/ImapcProxy
http://wiki2.dovecot.org/Migration/Dsync
Diffstat (limited to 'roles/IMAP-proxy/tasks')
-rw-r--r-- | roles/IMAP-proxy/tasks/main.yml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/roles/IMAP-proxy/tasks/main.yml b/roles/IMAP-proxy/tasks/main.yml new file mode 100644 index 0000000..c630cfd --- /dev/null +++ b/roles/IMAP-proxy/tasks/main.yml @@ -0,0 +1,51 @@ +- name: Install Dovecot + apt: pkg={{ item }} + with_items: + - dovecot-core + - dovecot-imapd + +- name: Create a user 'imapproxy' + user: name=imapproxy system=yes + home=/home/imapproxy + shell=/bin/false + password=! + state=present + +- name: Create a home directory for user 'imapproxy' + file: path=/home/imapproxy + state=directory + owner=imapproxy group=imapproxy + mode=0700 + +- name: Configure Dovecot (1) + copy: src=etc/dovecot/conf.d/{{ item }} + dest=/etc/dovecot/conf.d/{{ item }} + owner=root group=root + mode=0644 + 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: + - Restart Dovecot + +- name: Start Dovecot + service: name=dovecot state=started + when: not (r1.changed or r2.changed) + +- meta: flush_handlers |