From de9207f48d8dcdd716762b307a318f758a487d3d Mon Sep 17 00:00:00 2001 From: Thomas Urban Date: Fri, 26 Mar 2021 09:33:01 +0100 Subject: [PATCH] #1946: fixing envelope-from on sieve redirecting --- setup/mail-dovecot.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup/mail-dovecot.sh b/setup/mail-dovecot.sh index c6e6cb3a..b08098f2 100755 --- a/setup/mail-dovecot.sh +++ b/setup/mail-dovecot.sh @@ -192,6 +192,12 @@ EOF cp conf/sieve-spam.txt /etc/dovecot/sieve-spam.sieve sievec /etc/dovecot/sieve-spam.sieve +# Adjust sieve to use local account's address as envelope-from in forwarding +# mails to external MTAs (#1946). +grep sieve_redirect_envelope_from /etc/dovecot/conf.d/99-local-sieve.conf &>/dev/null || \ + sed -i /etc/dovecot/conf.d/99-local-sieve.conf -e '/^}$/ i\ + sieve_redirect_envelope_from = orig_recipient' + # PERMISSIONS # Ensure configuration files are owned by dovecot and not world readable.