]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3-login: If mail_max_userip_connections is reached, reply to login with [IN-USE...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 3 Dec 2025 09:43:19 +0000 (11:43 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 27 Nov 2025 07:53:37 +0000 (07:53 +0000)
The [IN-USE] indicates that the mailbox is locked for servers that allow
only a single POP3 client at a time. This is similar to rejecting login
due to too many concurrent logins.

src/pop3-login/client-authenticate.c
src/pop3-login/client.c
src/pop3-login/client.h

index 742405a3d5208abd88c12570a5c02f6bcd3d056d..6cde23ee0d6cb9ccbd1f08bc1a916ab0da5ff5ae 100644 (file)
@@ -89,6 +89,9 @@ void pop3_client_auth_result(struct client *client,
        case CLIENT_AUTH_RESULT_TEMPFAIL:
                client_send_reply(client, POP3_CMD_REPLY_TEMPFAIL, text);
                break;
+       case CLIENT_AUTH_RESULT_LIMIT_REACHED:
+               client_send_reply(client, POP3_CMD_REPLY_LIMIT, text);
+               break;
        case CLIENT_AUTH_RESULT_AUTHFAILED:
        case CLIENT_AUTH_RESULT_AUTHFAILED_REASON:
        case CLIENT_AUTH_RESULT_AUTHZFAILED:
index 020f398ede8f88232a683629ce60babe931674c4..4f32efef57ddb2436a20ac88ff20566c94738d89 100644 (file)
@@ -302,6 +302,9 @@ void client_send_reply(struct client *client, enum pop3_cmd_reply reply,
        case POP3_CMD_REPLY_TEMPFAIL:
                prefix = "-ERR [SYS/TEMP]";
                break;
+       case POP3_CMD_REPLY_LIMIT:
+               prefix = "-ERR [IN-USE]";
+               break;
        case POP3_CMD_REPLY_AUTH_ERROR:
                if (text[0] == '[')
                        prefix = "-ERR";
index 3823685821041ad30ad9855ceb0de5f866872066..86fc5aa398cb7ba7b02433f6e05464b749ba7383 100644 (file)
@@ -31,7 +31,8 @@ enum pop3_cmd_reply {
        POP3_CMD_REPLY_OK,
        POP3_CMD_REPLY_ERROR,
        POP3_CMD_REPLY_AUTH_ERROR,
-       POP3_CMD_REPLY_TEMPFAIL
+       POP3_CMD_REPLY_TEMPFAIL,
+       POP3_CMD_REPLY_LIMIT,
 };
 
 void client_send_reply(struct client *client, enum pop3_cmd_reply reply,