]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: lmtp-proxy - Use the per-recipient session ID for the "Saved" message.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 4 Oct 2021 00:58:15 +0000 (02:58 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 6 Oct 2021 21:58:03 +0000 (21:58 +0000)
src/lmtp/lmtp-proxy.c

index 48e399f4d4beda9152a61cc3f8732b7a1588aefd..4a384dd92acd7f020400a6fde265ce2fe6ff9ff0 100644 (file)
@@ -718,7 +718,8 @@ lmtp_proxy_data_cb(const struct smtp_reply *proxy_reply,
                   struct lmtp_proxy_recipient *lprcpt)
 {
        struct lmtp_proxy_connection *conn = lprcpt->conn;
-       struct smtp_server_recipient *rcpt = lprcpt->rcpt->rcpt;
+       struct lmtp_recipient *lrcpt = lprcpt->rcpt;
+       struct smtp_server_recipient *rcpt = lrcpt->rcpt;
        struct lmtp_proxy *proxy = conn->proxy;
        struct smtp_server_transaction *trans = proxy->trans;
        struct smtp_address *address = lprcpt->address;
@@ -748,7 +749,7 @@ lmtp_proxy_data_cb(const struct smtp_reply *proxy_reply,
                e_info(rcpt->event, "%s", str_c(msg));
 
                /* Substitute our own success message */
-               smtp_reply_printf(&reply, 250, "%s Saved", trans->id);
+               smtp_reply_printf(&reply, 250, "%s Saved", lrcpt->session_id);
                /* Do let the enhanced code through */
                if (!smtp_reply_has_enhanced_code(proxy_reply))
                        reply.enhanced_code = SMTP_REPLY_ENH_CODE(2, 0, 0);