]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: Block server input handling until proxy connection to relay server completes.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 27 Dec 2017 13:36:10 +0000 (14:36 +0100)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Fri, 9 Feb 2018 12:00:51 +0000 (14:00 +0200)
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.

src/submission/submission-client.c

index c614fa391ed4f5d284a28af3f76e10a633bf69d7..5264799d84934f3b314000caee8cd2c61f52ca65 100644 (file)
@@ -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,
@@ -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' &&