From 9c54d83ba3c0de4fc249fcd9acae6979f07110d6 Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Thu, 11 Oct 2018 00:49:44 +0200 Subject: [PATCH] lmtp: proxy: Allocate recipients for the client transaction on the server recipient pool. --- src/lmtp/lmtp-proxy.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lmtp/lmtp-proxy.c b/src/lmtp/lmtp-proxy.c index aefee98ce9..fdfd2b1303 100644 --- a/src/lmtp/lmtp-proxy.c +++ b/src/lmtp/lmtp-proxy.c @@ -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; } -- 2.47.3