1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-13 09:56:01 +00:00

[Dovecot] Ignore app passwords protocol access on SOGo request

This commit is contained in:
FreddleSpl0it
2025-04-09 08:02:30 +02:00
parent 3ddad9dee8
commit 766c5e8580
2 changed files with 4 additions and 2 deletions

View File

@@ -79,7 +79,9 @@ if ($isSOGoRequest) {
}
}
if ($result === false){
$result = apppass_login($post['username'], $post['password'], array($post['service'] => true), array(
// If it's a SOGo Request, don't check for protocol access
$service = (isSOGoRequest) ? false : array($post['service'] => true);
$result = apppass_login($post['username'], $post['password'], $service, array(
'is_internal' => true,
'remote_addr' => $post['real_rip']
));

View File

@@ -29,7 +29,7 @@ function auth_password_verify(request, password)
insecure = true
}
if c ~= 200 then
if c ~= 200 and c ~= 401 then
dovecot.i_info("HTTP request failed with " .. c .. " for user " .. request.user)
return dovecot.auth.PASSDB_RESULT_INTERNAL_FAILURE, "Upstream error"
end