Re: [exim] Replace From with To for forwarded mails and also…

Top Page
Delete this message
Reply to this message
Author: Shamim Shahriar
Date:  
To: exim-users
Subject: Re: [exim] Replace From with To for forwarded mails and also encapsulate email.
On 20/04/2020 17:34, Sebastian Nielsen via Exim-users wrote:
> Correct, thats what I want to do. But ideally I want to also replace the
> MIME From: in the email (but also preserve the original one).
> By encapsulate the email.
>
> Check this email I send here. You see that its in a attached .eml file.
> Mailman does this, but I want to implement something similiar for exim,
> propably by using a system filter.
>
> So a email that arrives like this and are bound for fwdaccount@??? :
> ***************
> MAIL FROM: hey@???
> RCPT TO: forwarded@???
> DATA
> From: hey@???
> To: forwarded@???
> Subject: Hi!
> Content-Type: text/plain
>
> Hey there!
> ***************
>
> Is forwarded like this:
> ***************
> MAIL FROM: forwarded@???
> RCPT TO: fwdaccount@???
> DATA
> From: forwarded@???
> To: fwdaccount@???
> Subject: Fwd: Hi!
> Content-Type: message/rfc822
>
> From: hey@???
> To: forwarded@???
> Subject: Hi!
> Content-Type: text/plain
>
> Hey there!
> ***************
>
>


Hi Sebastian

As Jeremy has pointed out, that is NOT the task for the MTA. You can use
various different additional programmes to do this. In fact, if I am not
mistaken, asking the MTA to do what you are asking might even violate
the RFC (appreciate if someone could please confirm).

Also, please think of the consequence. Most MUAs rely on the header data
to do various fun things -- i.e., organise by thread, apply filters, and
so on. To and From are not the only headers -- there are more to it. If
you are putting all the former headers into the body -- what do you
think is likely to happen? I can assure you that I, as a recipient, will
be seriously unhappy and confused by that!

The only correct solution that I know of, to this date, is the SRS. Give
it a go, and very likely you will find that it solves the issues are you
are trying find workaround for.

Hope this makes sense.
Regards