aboutsummaryrefslogtreecommitdiff
path: root/app/email
diff options
context:
space:
mode:
Diffstat (limited to 'app/email')
-rw-r--r--app/email/build/dovecot/Dockerfile2
-rw-r--r--app/email/build/dovecot/conf/dovecot.conf24
-rw-r--r--app/email/config/dovecot/dovecot-ldap.conf.tpl6
-rw-r--r--app/email/deploy/email.hcl2
4 files changed, 22 insertions, 12 deletions
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"