On Thu, Jul 31, 2014 at 07:15:03PM +0000, Xie, Wei wrote:
> In Postfix header_check, I would like to know how to fetch "From
> address" from header via Postfix head_check. The rule "/^From:
> (.*) / PREPEND Resent-From: [email protected] " seems not working.
Actually you would not like to this. Because setting "Resent-From:"
to duplicate the "From:" address is silly. I thought you wanted
"Resent-From:" to record the receiving address whose mail forwarded,
not the message author. The envelope recipient often does not
appear in message headers at all.
You're barking up the wrong tree I'm afraid. What you want is
best done in a delivery agent with:
<transport>_destination_recipient_limit = 1
to ensure that the message being modified is routed to exactly one
recipient. At that point you can inject various headers that record
the recipient address prior to forwarding. Avoiding "Resent-From"
if you're paying attention.
--
Viktor.