Re: [exim] Rewrite Rcpt in copied mail

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Evgeniy Berdnikov
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Rewrite Rcpt in copied mail
On Mon, Apr 27, 2020 at 05:25:03PM +0200, Kai Bojens via Exim-users wrote:
> Am 27.04.20 um 17:03 schrieb Evgeniy Berdnikov via Exim-users:
>
> >> … in order to send these mails to this specific server. In my
> >> understanding "redirect" only manipulates the adressess but could not be
> >> combined with the specific route to this archiving server.
>
> > Why? "Redirect" router changes recipient's address, and "manualroute"
> > router feeds a copy with new address to specific transport.
>
> The original mail must stay unchanged. Only the copied mail needs a) to
> be routed to the archiving server and b) has its envelope recipient
> changed.


I think it should work as you described. Did you try?

> The only way this could work is when I would redirect the copy
> to exim itself to restart the delivery process and then manipulate the
> destination. But this sounds like the first step into hell ;)


After "redirect" router the routing chain is restarted: routers are
applied again with new recipient address. It's documented.

> If I understand the documentation correctly the manipulation within one
> router is exclusive to this router so that even an "unseen" would not
> preserve these changes.


Would it be so, redirect router will will never work. Obviously,
it have sense only if routers are chained. Chain terminates
on the router which feeds address to transport.

> Maybe I just send the copied mail to the archive server and set up an
> Exim daemon on this server to then manipulate the headers before
> injecting the mail into the archive daemon.


You wrote about envelope address above, not about headers.
Headers may be also changed. However, it's another topic.
--
Eugene Berdnikov