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/templates/etc | |
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/templates/etc')
-rw-r--r-- | roles/IMAP-proxy/templates/etc/dovecot/conf.d/20-imapc.conf.j2 | 18 | ||||
-rw-r--r-- | roles/IMAP-proxy/templates/etc/dovecot/conf.d/auth-imap.conf.ext.j2 | 17 |
2 files changed, 35 insertions, 0 deletions
diff --git a/roles/IMAP-proxy/templates/etc/dovecot/conf.d/20-imapc.conf.j2 b/roles/IMAP-proxy/templates/etc/dovecot/conf.d/20-imapc.conf.j2 new file mode 100644 index 0000000..a6b70c6 --- /dev/null +++ b/roles/IMAP-proxy/templates/etc/dovecot/conf.d/20-imapc.conf.j2 @@ -0,0 +1,18 @@ +# Smart IMAP proxying with imapc storage +# +# http://dovecot.org/pipermail/dovecot/2011-January/056975.html +# http://wiki2.dovecot.org/HowTo/ImapcProxy +# http://wiki2.dovecot.org/Migration/Dsync + +imapc_host = {{ IMAP }} +imapc_port = 143 +imapc_user = %u + +# Read multiple mails in parallel, improves performance +mail_prefetch_count = 20 + +# The list of valid features can be found there +# http://hg.dovecot.org/dovecot-2.1/file/f572fbafb445/src/lib-storage/index/imapc/imapc-settings.c +# (in the struct 'imapc_feature_list imapc_feature_list') +imapc_features = rfc822.size + diff --git a/roles/IMAP-proxy/templates/etc/dovecot/conf.d/auth-imap.conf.ext.j2 b/roles/IMAP-proxy/templates/etc/dovecot/conf.d/auth-imap.conf.ext.j2 new file mode 100644 index 0000000..5e2b28c --- /dev/null +++ b/roles/IMAP-proxy/templates/etc/dovecot/conf.d/auth-imap.conf.ext.j2 @@ -0,0 +1,17 @@ +# Authentication via remote IMAP server. Included from auth.conf. +# +# <doc/wiki/PasswordDatabase.IMAP.txt> + +passdb { + driver = imap + args = host={{ IMAP }} port=143 + default_fields = userdb_imapc_user=%u userdb_imapc_password=%w +} + +# "prefetch" user database means that the passdb already provided the +# needed information and there's no need to do a separate userdb lookup. +# <doc/wiki/UserDatabase.Prefetch.txt> +userdb { + driver = prefetch + default_fields = home=/home/imapproxy/%d/%n +} |