be using only Dovecot as their backend :) */
enum login_proxy_failure_type failure_type =
LOGIN_PROXY_FAILURE_TYPE_AUTH_REPLIED;
- if ((status / 100) == 4)
+ if (status == 421) {
+ /* The backend won't accept further AUTH attempts on this
+ connection. If it signaled 4.7.0, the user's connection
+ limit (mail_max_userip_connections) was reached; report
+ that specifically. Otherwise treat as a generic auth
+ reply (e.g. backend shutting down). The reply was
+ prepared from the backend's 421 line; forward it to the
+ client and detach the AUTH command. */
+ failure_type = (null_strcmp(enh_code, "4.7.0") == 0) ?
+ LOGIN_PROXY_FAILURE_TYPE_AUTH_LIMIT_REACHED_REPLIED :
+ LOGIN_PROXY_FAILURE_TYPE_AUTH_REPLIED;
+ i_assert(subm_client->proxy_reply != NULL);
+ smtp_server_reply_submit(subm_client->proxy_reply);
+ subm_client->pending_auth = NULL;
+ } else if ((status / 100) == 4)
failure_type = LOGIN_PROXY_FAILURE_TYPE_AUTH_TEMPFAIL;
else if (!submission_proxy_handle_redirect(
client, status, enh_code, text, &failure_type, &text)) {