]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: Don't log auth referral disconnects as having "internal error"
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 11 May 2021 18:10:59 +0000 (21:10 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 17 Jan 2022 11:52:09 +0000 (13:52 +0200)
src/login-common/client-common-auth.c
src/login-common/client-common.c
src/login-common/client-common.h

index 3a4f574c79898808c438628fde8f49d83e16645a..848285a14ed0db274ca19119d7a467c5e231c086 100644 (file)
@@ -737,6 +737,7 @@ client_auth_handle_reply(struct client *client,
                        reason = "Logged in, but you should use this server instead.";
 
                if (reply->nologin) {
+                       client->auth_nologin_referral = TRUE;
                        client_auth_result(client,
                                CLIENT_AUTH_RESULT_REFERRAL_NOLOGIN,
                                reply, reason);
index d3df9bb57b1c3a2adabb95018fccecc202aec4aa..6fec73c60171f7b6e34be3a8a55bbfaf41412539 100644 (file)
@@ -1077,6 +1077,8 @@ const char *client_get_extra_disconnect_reason(struct client *client)
        if (client->auth_process_comm_fail)
                return "(auth process communication failure)";
 
+       if (client->auth_nologin_referral)
+               return "(auth referral)";
        if (client->proxy_auth_failed)
                return "(proxy dest auth failed)";
        if (client->auth_successes > 0) {
index 3d6dfad1c16bbf7b3fc4ec4b1608ea8b49988a3a..b3e7d720190fafb2260c2d0ff102bb0b772c1b9a 100644 (file)
@@ -253,6 +253,7 @@ struct client {
        bool auth_initializing:1;
        bool auth_process_comm_fail:1;
        bool auth_anonymous:1;
+       bool auth_nologin_referral:1;
        bool proxy_auth_failed:1;
        bool proxy_noauth:1;
        bool proxy_nopipelining:1;