From dfbf3e85bec414acb1f46ab0d8f614df23cf70a2 Mon Sep 17 00:00:00 2001 From: andryyy Date: Mon, 2 Dec 2019 10:53:25 +0100 Subject: [PATCH] [Dovecot] Add map for app passwds --- data/Dockerfiles/dovecot/docker-entrypoint.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/Dockerfiles/dovecot/docker-entrypoint.sh b/data/Dockerfiles/dovecot/docker-entrypoint.sh index 1aa75891..097895ab 100755 --- a/data/Dockerfiles/dovecot/docker-entrypoint.sh +++ b/data/Dockerfiles/dovecot/docker-entrypoint.sh @@ -127,6 +127,14 @@ default_pass_scheme = SSHA256 password_query = SELECT password FROM mailbox WHERE active = '1' AND username = '%u' AND domain IN (SELECT domain FROM domain WHERE domain='%d' AND active='1') AND JSON_EXTRACT(attributes, '$.force_pw_update') NOT LIKE '%%1%%' EOF +cat < /etc/dovecot/sql/dovecot-dict-sql-app-passdb.conf +# Autogenerated by mailcow +driver = mysql +connect = "host=/var/run/mysqld/mysqld.sock dbname=${DBNAME} user=${DBUSER} password=${DBPASS}" +default_pass_scheme = SSHA256 +password_query = SELECT password FROM app_passwd WHERE active = '1' AND mailbox = '%u' AND domain IN (SELECT domain FROM domain WHERE domain='%d' AND active='1') +EOF + # Migrate old sieve_after file [[ -f /etc/dovecot/sieve_after ]] && mv /etc/dovecot/sieve_after /etc/dovecot/global_sieve_after # Create global sieve scripts