In an older episode, on 2012-02-13 09:24, Peter wrote:
Is there a way to include the envelope-from address in message Received
headers?
It's the Return-Path header.
AFAIK, Return-Path is not part of the message header during SMTP
transport, but it is added by the MDA (mail delivery agent) during delivery.
To add the envelope-from address to the mail header, we use:
In main.cf:
smtpd_data_restrictions = check_sender_access
regexp:/etc/postfix/regexp.sender_data
In /etc/postfix/regexp.sender_data:
/(.*)/ prepend X-Envelope-From: <$1>
Hope this helps,
wolfgang