Re: [EXIM] Rewriting Received: headers

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Paul Phillips, Tom
CC: Exim users
Subject: Re: [EXIM] Rewriting Received: headers
On Thu, 13 Nov 1997, Paul Phillips wrote:

> One thing I miss very much from sendmail is this:
>
> Received: from redfish.go2net.com (redfish.go2net.com [207.178.55.5])
>         by zax.go2net.com (8.8.7/8.8.7) with SMTP id VAA29526
>         for <paulp@???>; Thu, 13 Nov 1997 21:18:52 -0800 (PST)
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^


I wrote exim to be fairly simple (it has expanded somewhat more than I
expected). There is a single Received: that is added to a message when
it arrives. To do what you want would require a different Received:
header for each recipient, because you must not reveal other envelope
recipients that may have been Bcc's. So Exim can't do what you want.

What does sendmail do if there are 100 recipients? Does it generate a
different Received for each one? What if it forwards a single copy to 10
of them on some remote host?

> I'm pretty darn sure
> ${local_part} should be "paulp" at the very least. This is exim 1.73
> if it matters.


At the time Received: is created, ${local_part} is unset, because it
isn't dealing with any one specific recipient.

> On Thu, 13 Nov 1997, Tom wrote:
>
> > Just enable the "Envelope-To:" header on your transport. Much nicer
> > than trying to more stuff into Received lines.
>
> This works swimmingly for local delivery. Unfortunately the mail
> in question is being received by exim on our mail server, then
> forwarded to me at my workstation. The docs say that
> envelope_to_add works only for local delivery and pipes, and
> indeed empirical evidence bears that out.


That is because Envelope-To: is not an official RFC 822 header and can
only be added when a message is leaving the transport system (i.e. on
"final" delivery).

I suppose one could add some kind of X-Envelope-To that identified the
host and the envelope; I'm not sure whether, if the message then went
through several hosts and expansions, this might be considered to pose a
privacy risk.

If your forwarding happens via some kind of special routing (e.g. a
domainlist router) you could send it via a special SMTP transport (not
the standard one) and specify

add_headers = "X-Original-Local-Part: ${original_local_part}"

or whatever.

I've made a note to think about this, but any action may not happen
before the next release.

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
*** Exim information can be found at http://www.exim.org/ ***