From: Stephan Bosch Date: Tue, 30 Mar 2021 22:06:29 +0000 (+0200) Subject: lmtp: lmtp-commands - Drop XRCPTFORWARD parameter once processed. X-Git-Tag: 2.3.15~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=899d11722e9494b64e5ca9f701ebab342c8cc504;p=thirdparty%2Fdovecot%2Fcore.git lmtp: lmtp-commands - Drop XRCPTFORWARD parameter once processed. This prevents it from popping up elsewhere. This for example crudely fixes a problem in the proxy where XRCPTFORWARD was sent even without backend server support. --- diff --git a/src/lmtp/lmtp-commands.c b/src/lmtp/lmtp-commands.c index cbafa644cc..34be6586c5 100644 --- a/src/lmtp/lmtp-commands.c +++ b/src/lmtp/lmtp-commands.c @@ -67,6 +67,10 @@ cmd_rcpt_handle_forward_fields(struct smtp_server_cmd_ctx *cmd, if (ret == 0) return 0; + /* Drop the parameter */ + (void)smtp_params_rcpt_drop_extra(&rcpt->params, + LMTP_RCPT_FORWARD_PARAMETER, NULL); + /* Check the real IP rather than the proxied client IP, since XCLIENT command will update that, thereby making it untrusted. Unlike the XCLIENT command, the RCPT forward parameter needs to be used after