From d9df322eda5a7147d2bf3c0bd4231ace923621f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Thu, 12 Jul 2018 00:46:17 +0200 Subject: [PATCH] [Dovecot] Remove additional hash scheme and let Dovecot decide the hash by prefix --- data/Dockerfiles/dovecot/docker-entrypoint.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/data/Dockerfiles/dovecot/docker-entrypoint.sh b/data/Dockerfiles/dovecot/docker-entrypoint.sh index 21c38107..c58f0384 100755 --- a/data/Dockerfiles/dovecot/docker-entrypoint.sh +++ b/data/Dockerfiles/dovecot/docker-entrypoint.sh @@ -91,22 +91,14 @@ user_query = SELECT CONCAT('maildir:/var/vmail/',maildir) AS mail, 5000 AS uid, iterate_query = SELECT username FROM mailbox WHERE active='1'; EOF -# Create default pass dict for Dovecot -cat < /usr/local/etc/dovecot/sql/dovecot-dict-sql-ssha256-passdb.conf +# Create pass dict for Dovecot +cat < /usr/local/etc/dovecot/sql/dovecot-dict-sql-passdb.conf driver = mysql connect = "host=mysql dbname=${DBNAME} user=${DBUSER} password=${DBPASS}" default_pass_scheme = SSHA256 password_query = SELECT password FROM mailbox WHERE 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 -# Create additional passdb dict for Dovecot -cat < /usr/local/etc/dovecot/sql/dovecot-dict-sql-additional-passdb.conf -driver = mysql -connect = "host=mysql dbname=${DBNAME} user=${DBUSER} password=${DBPASS}" -default_pass_scheme = ${ADDITIONAL_HASH_SCHEME} -password_query = SELECT password FROM mailbox WHERE 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 - # Create global sieve_after script cat /usr/local/etc/dovecot/sieve_after > /var/vmail/sieve/global.sieve