274370RE: virtual_alias_maps and X-Original-To
- Feb 18, 2011
> Aliasing via virtual(5) is brutally efficient. No content modification,Thanks again Viktor.
> just message routing, so the header is not added.
> To add an X-Original-Recipient header, messages to multiple recipients
> have to be split into one copy per-recipient since the header you want
> is recipient-specific.
> Since the queue file contains a single copy of the message for all
> recipients, such rewriting *cannot* happen on input, it can only happen on
> output via a delivery agent that is processing a single recipient. This
> means you need a custom transport for this destination that processes
> mail one recipient at a time and prepends the header.
> This can be done via an external program via pipe(8) or by modifying the
> source code of the smtp(8) delivery agent so that the header is added when
> a suitable boolean flag is set and the message has exactly one recipient.
> The pipe(8) approach would then re-submit the mail for outbound delivery
> to a different Postfix instance to avoid loops.
It sounds a bit more in depth than I was hoping for. Given the _only_ function for this alias is to forward to one address, would it be possible to do a simpler approach?
- << Previous post in topic Next post in topic >>