[Dovecot] LUA: Passdb: Reconnect to SQL if connection was lost
parent
c54cfbf332
commit
3d2962a12d
|
@ -123,6 +123,9 @@ function auth_password_verify(req, pass)
|
||||||
if req.domain == nil then
|
if req.domain == nil then
|
||||||
return dovecot.auth.PASSDB_RESULT_USER_UNKNOWN, "No such user"
|
return dovecot.auth.PASSDB_RESULT_USER_UNKNOWN, "No such user"
|
||||||
end
|
end
|
||||||
|
if cur == nil then
|
||||||
|
script_init()
|
||||||
|
end
|
||||||
local cur,errorString = con:execute(string.format([[SELECT mailbox, password FROM app_passwd
|
local cur,errorString = con:execute(string.format([[SELECT mailbox, password FROM app_passwd
|
||||||
WHERE mailbox = '%s'
|
WHERE mailbox = '%s'
|
||||||
AND active = '1'
|
AND active = '1'
|
||||||
|
|
|
@ -183,7 +183,7 @@ services:
|
||||||
- sogo
|
- sogo
|
||||||
|
|
||||||
dovecot-mailcow:
|
dovecot-mailcow:
|
||||||
image: mailcow/dovecot:1.111
|
image: mailcow/dovecot:1.112
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql-mailcow
|
- mysql-mailcow
|
||||||
dns:
|
dns:
|
||||||
|
|
Loading…
Reference in New Issue