274378Re: virtual_alias_maps and X-Original-To
- Feb 18, 2011Adam Hamer:
[ Charset ISO-8859-1 unsupported, converting... ]
>If it is only for one special case,
> > Aliasing via virtual(5) is brutally efficient. No content modification,
> > 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.
> > --
> > Viktor.
> ??Thanks again Viktor.
> It sounds a bit more in depth than I was hoping for. Given the _only_ func
>-tion for this alias is to forward to one address, would it be possible to do
>- a simpler approach??
user@... PREPEND: X-Original-To: username@...
If it is for EXIM emulation:
/(.+)/ PREPEND: X-Envelope-To: $1
Either way, if mail has multiple recipients, then they will see
the prepended message header.
- << Previous post in topic Next post in topic >>