Viktor,

>>Your reply is HTML-formatted, and takes too much work to de-HTML.
>>So I can't reply in detail.

I change my previous email to plain text format and send it to you again.


>>> The most fundamental is that the original recipient that is forwarded often 
>>> does not appear in any headers and so cannot be extracted from header 
>>> content

For example, 

From: a...@yahoo.com
To: test...@osu.edu  (is forwarded to d...@hotmail.com)

In header_checks, I use the rule " /^To: (.*)/ PREPEND Resent-From: $1" to 
extract original recipient test...@osu.edu from  the header of test emails and 
add one line "Resent-From: test...@osu.edu" into the header of test messages.

But anyway, thanks for all of time!!!

Carl




-----Original Message-----
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Viktor Dukhovni
Sent: Tuesday, August 05, 2014 4:00 PM
To: postfix-users@postfix.org
Subject: Re: How to fetch From address from header via Postfix head_check?

On Tue, Aug 05, 2014 at 04:56:57PM +0000, Xie, Wei wrote:

> Sorry to reply to you lately due to some reasons.

Your reply is HTML-formatted, and takes too much work to de-HTML.
So I can't reply in detail.

> The logic of our requirement or idea is described as the following 
> syntax in terms of header_check in Postfix: To any forwarding emails 
> from non-osu.edu and non-ohio-state.edu sender addresses, we need 
> fetch "original to address" and add one line "Resent-From: <original 
> to address>" via Postfix.

As explained before, overloading Resent-From: in this way is a bad idea.  
Secondly header-checks cannot do this for multiple reasons.
The most fundamental is that the original recipient that is forwarded often 
does not appear in any headers and so cannot be extracted from header content.

A delivery agent processing one recipient at a time, (e.g. local(8)) can insert 
recipient-specific headers, and in fact local(8) typically inserts 
"Delivered-To:".  You'd naturally have to delay recipient rewriting so that the 
delivery agent sees the original address and performs the rewriting itself.  It 
may be possible to do something with "ORCPT" and an SMTP delivery agent 
delivering to a custom SMTP talker.

Mostly, it is still unclear why what you say you want, even with some header 
other than "Resent-From:" is plausibly a good idea.

I'm afraid that's all the help I can give.

-- 
        Viktor.

Reply via email to