From: Stephan Bosch Date: Fri, 9 Mar 2018 15:09:16 +0000 (+0100) Subject: lmtp: Provide hidden support for ORCPT RCPT parameter. X-Git-Tag: 2.3.1~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4688bd12ecee260fb60699f8741c6d3263b9800;p=thirdparty%2Fdovecot%2Fcore.git lmtp: Provide hidden support for ORCPT RCPT parameter. 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. --- diff --git a/src/lmtp/client.c b/src/lmtp/client.c index 7089e888f7..9f50d11399 100644 --- a/src/lmtp/client.c +++ b/src/lmtp/client.c @@ -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; diff --git a/src/lmtp/lmtp-proxy.c b/src/lmtp/lmtp-proxy.c index eef86be95a..80b52f70c6 100644 --- a/src/lmtp/lmtp-proxy.c +++ b/src/lmtp/lmtp-proxy.c @@ -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,