Skip to content

Commit

Permalink
submission: commands: Expect connection setup errors from relaying co…
Browse files Browse the repository at this point in the history
…mmands.

Subsequent changes remove the guarantee that the connection is setup successfuly
(to gain EHLO capabilities) before commands are submitted. This means that the
callbacks from commands can thereafter return connection setup errors as well.
  • Loading branch information
stephanbosch authored and cmouse committed Oct 9, 2018
1 parent ae86163 commit 86d15f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/submission/submission-backend-relay.c
Expand Up @@ -43,7 +43,8 @@ backend_relay_handle_relay_reply(struct submission_backend_relay *backend,
case SMTP_CLIENT_COMMAND_ERROR_HOST_LOOKUP_FAILED:
case SMTP_CLIENT_COMMAND_ERROR_CONNECT_FAILED:
case SMTP_CLIENT_COMMAND_ERROR_AUTH_FAILED:
i_unreached();
client_destroy(client,
"4.4.0", "Failed to connect to relay server");
return FALSE;
case SMTP_CLIENT_COMMAND_ERROR_CONNECTION_CLOSED:
case SMTP_CLIENT_COMMAND_ERROR_CONNECTION_LOST:
Expand Down

0 comments on commit 86d15f8

Please sign in to comment.