]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: proxy: Allocate recipients for the client transaction on the server recipient...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 10 Oct 2018 22:49:44 +0000 (00:49 +0200)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Mon, 15 Oct 2018 23:26:18 +0000 (01:26 +0200)
src/lmtp/lmtp-proxy.c

index aefee98ce90981df5c404df54849cd1516dca03d..fdfd2b13039a21aac1c15814f43a147bc659a1f2 100644 (file)
@@ -478,6 +478,7 @@ int lmtp_proxy_rcpt(struct client *client,
        const char *const *fields, *errstr, *orig_username = username;
        struct smtp_proxy_data proxy_data;
        struct smtp_address *user;
+       struct smtp_client_transaction_rcpt *relay_rcpt;
        pool_t auth_pool;
        int ret;
 
@@ -578,9 +579,11 @@ int lmtp_proxy_rcpt(struct client *client,
                lmtp_proxy_rcpt_approved, lprcpt);
        rcpt->context = lprcpt;
 
-       smtp_client_transaction_add_rcpt(conn->lmtp_trans,
-               address, &rcpt->params,
-               lmtp_proxy_rcpt_cb, lmtp_proxy_data_cb, lprcpt);
+       relay_rcpt = smtp_client_transaction_add_pool_rcpt(
+               conn->lmtp_trans, rcpt->pool, address, &rcpt->params,
+               lmtp_proxy_rcpt_cb, lprcpt);
+       smtp_client_transaction_rcpt_set_data_callback(
+               relay_rcpt, lmtp_proxy_data_cb, lprcpt);
        return 1;
 }