]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: Initialize proxy connection before starting the SMTP server connection.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 24 Dec 2017 11:15:29 +0000 (12:15 +0100)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 24 Dec 2017 14:52:25 +0000 (16:52 +0200)
The smtp_server_connection_login() function gets pre-login connection data from login service, which can contain commands.
The execution of commands expects the proxy connection object to be initialized.

src/submission/submission-client.c

index af0c6afd48df0eae3ea1e2339acb73ac20a7452f..f38fb5793ab36b1fd4981c3456661621109c7afa 100644 (file)
@@ -202,12 +202,13 @@ struct client *client_create(int fd_in, int fd_out,
        client->conn = smtp_server_connection_create(smtp_server,
                fd_in, fd_out, user->conn.remote_ip, user->conn.remote_port,
                &smtp_set, &smtp_callbacks, client);
+
+       client_proxy_create(client, set);
+
        smtp_server_connection_login(client->conn,
                client->user->username, helo,
                pdata, pdata_len, user->conn.ssl_secured);
 
-       client_proxy_create(client, set);
-
        mail_set = mail_user_set_get_storage_set(user);
        if (*set->imap_urlauth_host != '\0' &&
            *mail_set->mail_attribute_dict != '\0') {