From 3d2962a12d0c375238e1b6d4fe2a32da730252ac Mon Sep 17 00:00:00 2001 From: andryyy Date: Thu, 20 Feb 2020 17:48:57 +0100 Subject: [PATCH] [Dovecot] LUA: Passdb: Reconnect to SQL if connection was lost --- data/Dockerfiles/dovecot/docker-entrypoint.sh | 3 +++ docker-compose.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/data/Dockerfiles/dovecot/docker-entrypoint.sh b/data/Dockerfiles/dovecot/docker-entrypoint.sh index 41302b36..fa5a9e32 100755 --- a/data/Dockerfiles/dovecot/docker-entrypoint.sh +++ b/data/Dockerfiles/dovecot/docker-entrypoint.sh @@ -123,6 +123,9 @@ function auth_password_verify(req, pass) if req.domain == nil then return dovecot.auth.PASSDB_RESULT_USER_UNKNOWN, "No such user" end + if cur == nil then + script_init() + end local cur,errorString = con:execute(string.format([[SELECT mailbox, password FROM app_passwd WHERE mailbox = '%s' AND active = '1' diff --git a/docker-compose.yml b/docker-compose.yml index 0995552b..19fd4084 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -183,7 +183,7 @@ services: - sogo dovecot-mailcow: - image: mailcow/dovecot:1.111 + image: mailcow/dovecot:1.112 depends_on: - mysql-mailcow dns: