Fabio Sangiovanni | 9 Feb 19:12
Picon
Favicon

Redirect all mail to one user retaining original envelope rcpt

Hi,

I need to configure Postfix to get the following result: I need every mail submitted by users to be
redirected to a remote account (via SMTP or LMTP), and every message must contain an header with the
original envelope rcpt.
Example:

user MUA submits 2 messages, one for aaa <at> domain1.com and the other for bbb <at> domain2.com; I need this two
messages NOT to be delivered to their respective recipients, but to another inbox, let's say
final_inbox <at> domain3.com, using SMTP or LMTP as delivery agent. Once in the inbox, I need to be able to get
the original envelope recipients (aaa <at> domain1.com and bbb <at> domain2.com) in some kind of headers.

I successfully managed to get this result with local delivery (X-Original-To: header), but I couldn't
find a way to keep the same information with smtp; it appears only in the Received: header, while I'd like to
have a dedicated one, if possible.

Is there a way I can get this kind of setup?

Thanks for your help!

Gmane