[Dovecot] LUA: Passdb: Reconnect to SQL if connection was lost

master
andryyy 2020-02-20 17:48:57 +01:00
parent c54cfbf332
commit 3d2962a12d
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 4 additions and 1 deletions

View File

@ -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'

View File

@ -183,7 +183,7 @@ services:
- sogo
dovecot-mailcow:
image: mailcow/dovecot:1.111
image: mailcow/dovecot:1.112
depends_on:
- mysql-mailcow
dns: