]> 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)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Wed, 14 Mar 2018 08:11:01 +0000 (10:11 +0200)
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 eef86be95a37423bccee3ec038ccd31740fc7ead..80b52f70c6c5da427f4f0fcb800946ee7fb9730b 100644 (file)
@@ -207,6 +207,7 @@ lmtp_proxy_get_connection(struct lmtp_proxy *proxy,
 
        i_zero(&lmtp_set);
        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,