]> 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)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 28 Dec 2017 18:43:39 +0000 (20:43 +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 b7c2dfb27a2f3c3f98d7104dfb854eeabfca1666..26f022d1fcc633542893dac634e65c11e188b381 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,
@@ -208,7 +208,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' &&