Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding envelope-from in Received headers

224 views
Skip to first unread message

Nikolaos Milas

unread,
Feb 13, 2012, 2:59:20 AM2/13/12
to
Hello,

I've noticed that message Received headers do not include the
envelope-from address.

Is there a way to include the envelope-from address in message Received
headers?

I am running Postfix 2.8.x (built from source).

Thanks,
Nick

Peter

unread,
Feb 13, 2012, 3:24:41 AM2/13/12
to
On 13/02/12 20:59, Nikolaos Milas wrote:
> Hello,
>
> I've noticed that message Received headers do not include the
> envelope-from address.
>
> Is there a way to include the envelope-from address in message Received
> headers?

It's the Return-Path header.


Peter

Nikolaos Milas

unread,
Feb 13, 2012, 3:57:48 AM2/13/12
to
On 13/2/2012 10:24 πμ, Peter wrote:

> It's the Return-Path header.

Great Peter!

Thanks.
Nick

Wolfgang Zeikat

unread,
Feb 13, 2012, 4:20:03 AM2/13/12
to
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

Peter

unread,
Feb 13, 2012, 4:29:26 AM2/13/12
to
On 13/02/12 22:20, Wolfgang Zeikat wrote:
> 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.

Correct, however the result is that the Return-Path contains the
envelope sender nonetheless.

> 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>

Sure, if Return-Path isn't good enough then this certainly works.


Peter

0 new messages