Skip to content

Commit

Permalink
submission: Properly handle omission of required authentication for r…
Browse files Browse the repository at this point in the history
…elay connection.

Particularly, do not forward the 530 error to the client. Instead, log the
problem and close the client connection with an internal error.
  • Loading branch information
stephanbosch authored and villesavolainen committed Mar 13, 2018
1 parent f199f59 commit 6899712
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/submission/submission-commands.c
Expand Up @@ -46,6 +46,19 @@ bool client_command_handle_proxy_reply(struct client *client,
client_destroy(client,
"4.4.0", "Lost connection to relay server");
return FALSE;
/* RFC 4954, Section 6: 530 5.7.0 Authentication required
This response SHOULD be returned by any command other than AUTH,
EHLO, HELO, NOOP, RSET, or QUIT when server policy requires
authentication in order to perform the requested action and
authentication is not currently in force. */
case 530:
i_error("Relay server requires authentication: %s",
smtp_reply_log(reply));
client_destroy(client, "4.3.5",
"Internal error occurred. "
"Refer to server log for more information.");
return FALSE;
default:
break;
}
Expand Down

0 comments on commit 6899712

Please sign in to comment.