Re: [exim] rewrite envelope from when forward

Top Page
Delete this message
Reply to this message
Author: Evgeniy Berdnikov
Date:  
To: exim-users
Subject: Re: [exim] rewrite envelope from when forward
On Wed, Sep 16, 2020 at 11:09:42PM +0200, Johannes Vogel via Exim-users wrote:
> I added the following line to my transport macros:
>
> REMOTE_SMTP_RETURN_PATH=$header_to:
>
> This works for me perfectly. Maybe for others too.


 1. Generally $header_to: is not a pure address. However, it should
    contain some address, which may be extracted with ${address:..}
    function, but note that header To: may contain several addresses,
    in this case ${address:..} function returns empty string.


 2. Debian configuration use REMOTE_SMTP_RETURN_PATH for "remote_smtp"
    and "remote_smtp_smarthost" transports regardless of mail origin.
    So in your configuration local mails are genarally sent with
    return path (env_from) equal to destination address. It lead at least
    to delivery failures for destination domains with SPF enabled.


 3. Content of To: header may be unrelated to destination envelope_to.
    In particular, for mail lists, such as "exim-users". Consequently
    with your configuration bounces on forwarding errors would try
    to be sent to mail list.


So, this appoach is inadequate. You have better to implement
some kind of SRS, as Mike Brudenell proposed.
--
Eugene Berdnikov