]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 31 Jan 2018 14:05:57 +0000 (16:05 +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 9478d4828da92d3d225c355d80b27b52b86d00b0..b04031ca34af0a8687552aa26d7e775087282e46 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') {