]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: Provide hidden support for ORCPT RCPT parameter.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 9 Mar 2018 15:09:16 +0000 (16:09 +0100)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 9 Mar 2018 15:09:16 +0000 (16:09 +0100)
This is normally only available with the DSN capability, but we use it to
forward the original recipient in proxy setups.

This feature was available in the original Dovecot v2.2 LMTP, but it got lost in
the new lib-smtp implementation.

src/lmtp/client.c
src/lmtp/lmtp-proxy.c

index 7089e888f7592a59dfae52ed60ae67360a337621..9f50d113995e936e6166fa10bf803f0228a5b4ea 100644 (file)
@@ -151,7 +151,8 @@ struct client *client_create(int fd_in, int fd_out,
                SMTP_CAPABILITY_ENHANCEDSTATUSCODES |
                SMTP_CAPABILITY_8BITMIME |
                SMTP_CAPABILITY_CHUNKING |
-               SMTP_CAPABILITY_XCLIENT;
+               SMTP_CAPABILITY_XCLIENT |
+               SMTP_CAPABILITY__ORCPT;
        if (!conn->ssl && master_service_ssl_is_enabled(master_service))
                lmtp_set.capabilities |= SMTP_CAPABILITY_STARTTLS;
        lmtp_set.hostname = client->unexpanded_lda_set->hostname;
index 75556151e6112ac096ce9aa3e8c261e0d5c98122..b0f9377db50c78f63cf06ad9badb4f68a968a44d 100644 (file)
@@ -210,6 +210,7 @@ lmtp_proxy_get_connection(struct lmtp_proxy *proxy,
        i_zero(&lmtp_set);
        lmtp_set.my_ip = conn->set.source_ip;
        lmtp_set.peer_trusted = TRUE;
+       lmtp_set.forced_capabilities = SMTP_CAPABILITY__ORCPT;
 
        lmtp_conn = smtp_client_connection_create(proxy->lmtp_client,
                set->protocol, conn->set.host, conn->set.port,