Skip to content

Commit

Permalink
submission: Block server input handling until proxy connection to rel…
Browse files Browse the repository at this point in the history
…ay server completes.

This makes sure we are aware of the full extent of the backend server's capabilities, before we start handling commands.
Before, only EHLO commands were blocked this way, but this did not account for MAIL/RCPT parameters, which are equally dependent.
Fixes problems with clients that send no EHLO after AUTH, like Thunderbird.
  • Loading branch information
stephanbosch authored and villesavolainen committed Feb 9, 2018
1 parent 8eb9c89 commit ffd0514
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/submission/submission-client.c
Expand Up @@ -96,8 +96,8 @@ static void client_proxy_ready_cb(const struct smtp_reply *reply,
SMTP_CAPABILITY_VRFY;
smtp_server_connection_set_capabilities(client->conn, caps);

/* send EHLO reply when EHLO command is pending */
client_handshake(client);
/* now that we know our capabilities, commence server protocol dialog */
smtp_server_connection_resume(client->conn);
}

static void client_proxy_create(struct client *client,
Expand Down Expand Up @@ -215,7 +215,7 @@ struct client *client_create(int fd_in, int fd_out,
smtp_server_connection_login(client->conn,
client->user->username, helo,
pdata, pdata_len, user->conn.ssl_secured);
smtp_server_connection_start(client->conn);
smtp_server_connection_start_pending(client->conn);

mail_set = mail_user_set_get_storage_set(user);
if (*set->imap_urlauth_host != '\0' &&
Expand Down

0 comments on commit ffd0514

Please sign in to comment.