diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-09-14 14:02:50 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-09-14 14:02:50 +0200 |
commit | 6716687fd7d15867d9b43d1560515f29f8260e95 (patch) | |
tree | b15f796e42edef2d0134dfbb6dd7047e92aa9397 | |
parent | a2a25e2ea41a4ee24440638c754966a56f8ca958 (diff) | |
download | infrastructure-6716687fd7d15867d9b43d1560515f29f8260e95.tar.gz infrastructure-6716687fd7d15867d9b43d1560515f29f8260e95.zip |
Finally fix dovecot
-rw-r--r-- | app/directory/deploy/directory.hcl | 2 | ||||
-rw-r--r-- | app/docker-compose.yml | 5 | ||||
-rw-r--r-- | app/email/build/dovecot/Dockerfile | 2 | ||||
-rw-r--r-- | app/email/build/dovecot/conf/dovecot.conf | 24 | ||||
-rw-r--r-- | app/email/config/dovecot/dovecot-ldap.conf.tpl | 6 | ||||
-rw-r--r-- | app/email/deploy/email.hcl | 2 |
6 files changed, 28 insertions, 13 deletions
diff --git a/app/directory/deploy/directory.hcl b/app/directory/deploy/directory.hcl index 6630036..32ca612 100644 --- a/app/directory/deploy/directory.hcl +++ b/app/directory/deploy/directory.hcl @@ -69,7 +69,7 @@ job "directory" { task "guichet" { driver = "docker" config { - image = "lxpz/guichet_amd64:14" + image = "superboum/guichet_amd64:15" readonly_rootfs = true ports = [ "web_port" ] volumes = [ diff --git a/app/docker-compose.yml b/app/docker-compose.yml index 90f6a58..c2cd2a3 100644 --- a/app/docker-compose.yml +++ b/app/docker-compose.yml @@ -36,6 +36,11 @@ services: VERSION: 9bafa64b9d image: superboum/amd64_alps:v1 + dovecot: + build: + context: ./email/build/dovecot + image: superboum/amd64_dovecot:v5 + # VoIP jitsi-meet: build: diff --git a/app/email/build/dovecot/Dockerfile b/app/email/build/dovecot/Dockerfile index 9b87627..8e57c57 100644 --- a/app/email/build/dovecot/Dockerfile +++ b/app/email/build/dovecot/Dockerfile @@ -1,4 +1,4 @@ -FROM amd64/debian:stretch +FROM amd64/debian:bullseye RUN apt-get update && \ apt-get install -y \ diff --git a/app/email/build/dovecot/conf/dovecot.conf b/app/email/build/dovecot/conf/dovecot.conf index 0d5068c..b0fffbf 100644 --- a/app/email/build/dovecot/conf/dovecot.conf +++ b/app/email/build/dovecot/conf/dovecot.conf @@ -19,10 +19,7 @@ service auth { } } -passdb { - args = /etc/dovecot/dovecot-ldap.conf - driver = ldap -} + service lmtp { inet_listener lmtp { @@ -31,6 +28,20 @@ service lmtp { } } +# https://doc.dovecot.org/configuration_manual/authentication/ldap_authentication/ +passdb { + args = /etc/dovecot/dovecot-ldap.conf + driver = ldap +} +userdb { + driver = prefetch +} +userdb { + args = /etc/dovecot/dovecot-ldap.conf + driver = ldap +} + + service imap-login { inet_listener imap { port = 143 @@ -40,11 +51,6 @@ service imap-login { } } -userdb { - args = uid=mailstore gid=mailstore home=/var/mail/%u - driver = static -} - protocol imap { mail_plugins = $mail_plugins imap_sieve } diff --git a/app/email/config/dovecot/dovecot-ldap.conf.tpl b/app/email/config/dovecot/dovecot-ldap.conf.tpl index a8bd72a..dc51e63 100644 --- a/app/email/config/dovecot/dovecot-ldap.conf.tpl +++ b/app/email/config/dovecot/dovecot-ldap.conf.tpl @@ -5,4 +5,8 @@ base = dc=deuxfleurs,dc=fr scope = subtree user_filter = (&(mail=%u)(&(objectClass=inetOrgPerson)(memberOf=cn=email,ou=groups,dc=deuxfleurs,dc=fr))) pass_filter = (&(mail=%u)(&(objectClass=inetOrgPerson)(memberOf=cn=email,ou=groups,dc=deuxfleurs,dc=fr))) -user_attrs = mail=/var/mail/%{ldap:cn} +user_attrs = \ + =user=%{ldap:cn}, \ + =mail=maildir:/var/mail/%{ldap:cn}, \ + =uid=1000, \ + =gid=1000 diff --git a/app/email/deploy/email.hcl b/app/email/deploy/email.hcl index d3dab3d..c0a651a 100644 --- a/app/email/deploy/email.hcl +++ b/app/email/deploy/email.hcl @@ -29,7 +29,7 @@ job "email" { driver = "docker" config { - image = "superboum/amd64_dovecot:v2" + image = "superboum/amd64_dovecot:v5" readonly_rootfs = false ports = [ "zauthentication_port", "imaps_port", "imap_port", "lmtp_port" ] command = "dovecot" |