x-Envelope-To:


#1

Anyone know a trick for identifying the recipient address of a delivered mail message? I.e. what other providers put in the X-Envelope-To: field.

Strangely DH’s Received: fields are unreliable in this respect, often omitting the address for no apparent reason e.g. omitted from:

Delivered-To: chrisjj@mrt.dreamhost.com
Received: from smtp2.freeserve.com (smtp2.wanadoo.co.uk [193.252.22.157])
by mrt.dreamhost.com (Postfix) with ESMTP
id EF5B9A86A3; Sun, 23 Oct 2005 12:08:50 -0700 (PDT)

whereas 4 secs previously on same server, received from same external server, included in:

Delivered-To: chrisjj@mrt.dreamhost.com
Received: from smtp2.freeserve.com (smtp2.wanadoo.co.uk [193.252.22.157])
by mrt.dreamhost.com (Postfix) with ESMTP id E516CA86D8
for info@lamilongadelaluna.com; Sun, 23 Oct 2005 12:08:46 -0700 (PDT)

I need this info to get the catch-all-incompatible Junk Filter to work on unknown addresses at which I am receiving spam.

Thanks.


#2

The "for " is not there in cases where there are multiple envelope-recipients. When they upgrade to Postfix V2, this will be fixed and an “X-Original-To:” header will be present. Junk filter might add one already. Could be wrong, but I think there is a longer post about this somewhere.


#3

[quote]The "for " is not there in cases where there are multiple envelope-recipients.

[/quote]

Thanks, but the second example shows otherwise - it has “for <…>” but is to multiple recipients, as I can see from the fact the two examples have identical next Received: header (below) and hence must be the same message to different recipients.

Chris

Received: from me-wanadoo.net (localhost [127.0.0.1])
by mwinf3104.me.freeserve.com (SMTP Server) with ESMTP id E0BD81C0008F;
Sun, 23 Oct 2005 21:08:43 0200 (CEST)


#4

They have different times and different SMTP queue IDs.

In this case:

for info@lamilongadelaluna.com;

there is one envelope-recipient for that message (info@lamilongadelaluna.com) - in the other case, the message was apparently sent to multiple recipients within that SMTP transaction. I could be wrong, but I’m pretty sure that I’m not.


#5

[quote]They have different times and different SMTP queue IDs.

[/quote]

Sure - at the DH server. But at the previous server, they have the same (fuller header below).

This means they are from the same origination, and hence the “for info@lamilongadelaluna.com” one must have multiple recipients, no?

Chris

Delivered-To: chrisjj@mrt.dreamhost.com
Received: from smtp2.freeserve.com (smtp2.wanadoo.co.uk [193.252.22.157])
by mrt.dreamhost.com (Postfix) with ESMTP id E516CA86D8
for info@lamilongadelaluna.com; Sun, 23 Oct 2005 12:08:46 -0700 (PDT)
Received: from me-wanadoo.net (localhost [127.0.0.1])
by mwinf3104.me.freeserve.com (SMTP Server) with ESMTP id E0BD81C0008F;
Sun, 23 Oct 2005 21:08:43 +0200 (CEST)
Received: from SuePeach (modem-551.gorilla.dialup.pol.co.uk [81.78.98.39])
by mwinf3104.me.freeserve.com (SMTP Server) with SMTP id 1070A1C00087;
Sun, 23 Oct 2005 21:08:08 +0200 (CEST)
X-ME-UUID: 20051023190809674.1070A1C00087@mwinf3104.me.freeserve.com
Message-ID: 002e01c5d806$18dd8020$27624e51@SuePeach

Return-Path: susan@peachtango.fsnet.co.uk
Delivered-To: chrisjj@mrt.dreamhost.com
Received: from smtp2.freeserve.com (smtp2.wanadoo.co.uk [193.252.22.157])
by mrt.dreamhost.com (Postfix) with ESMTP
id EF5B9A86A3; Sun, 23 Oct 2005 12:08:50 -0700 (PDT)
Received: from me-wanadoo.net (localhost [127.0.0.1])
by mwinf3104.me.freeserve.com (SMTP Server) with ESMTP id E0BD81C0008F;
Sun, 23 Oct 2005 21:08:43 +0200 (CEST)
Received: from SuePeach (modem-551.gorilla.dialup.pol.co.uk [81.78.98.39])
by mwinf3104.me.freeserve.com (SMTP Server) with SMTP id 1070A1C00087;
Sun, 23 Oct 2005 21:08:08 +0200 (CEST)
X-ME-UUID: 20051023190809674.1070A1C00087@mwinf3104.me.freeserve.com
Message-ID: 002e01c5d806$18dd8020$27624e51@SuePeach


#6

I’m talking about multiple envelope-recipients (within the SMTP transaction to the DH mail server), e.g.,
RCPT TO:someaddress@example.com
RCPT TO:anotheraddress@example.net
(etc)
vs. just one.

For whatever reason, the sending machine (smtp2.freeserve.com) batched them as different transactions… the submission from the local machine was all one message, but then when sending to the DH mail server, it was in two separate transactions.

Postfix didn’t have a way to do this until version 2.x for architechtural reasons - for some reason, with the older code, it was too hard to make this information available while still following the requirement of not exposing other recipients of the message.

Given that the www machines have already been upgraded, and that at least some of the Postfix v2 config stuff is probably already done (between the junk filter machines and www machines), my guess is that mail servers will be upgraded sometime in the not-terribly-distant future.


#7

[quote]I’m talking about multiple envelope-recipients (within
the SMTP transaction to the DH mail server)

[/quote]

Oh, /that/ SMTP transaction - now I get you.

But still I see examples that don’t fit, e.g.

Return-Path: chrisjj@chrisjj.com
Delivered-To: chrisjj@dishpan.dreamhost.com
Received: from chrisjj.com (cpc3-cmbg3-5-0-cust134.cmbg.cable.ntl.com [81.100.93.134])
by dishpan.dreamhost.com (Postfix) with SMTP id 6542C12DA19
for chrisjj@chrisjj.com; Mon, 24 Oct 2005 14:32:43 -0700 (PDT)
Received: from chrisjj.com ([127.0.0.1])
by [127.0.0.1] with SMTP (SpamPal v1.591)
sender chrisjj@chrisjj.com; 24 Oct 2005 22:32:46 +0100
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Date: Mon, 24 Oct 2005 22:32 +0100 (BST)
From: chrisjj@chrisjj.com (Chris John Jordan)
Subject: RE: Fw: easyJet booking reference: [snip]
Cc: chrisjj@chrisjj.com
In-Reply-To: BAY24-F3000F8579AC9A20B798439B6730@phx.gbl
Reply-To: chrisjj@chrisjj.com
Message-Id: memo.20051024223244.804A@chrisjj.com

v.

Return-Path: chrisjj@chrisjj.com
Delivered-To: chrisjj@dishpan.dreamhost.com
Received: from chrisjj.com (cpc3-cmbg3-5-0-cust134.cmbg.cable.ntl.com [81.100.93.134])
by dishpan.dreamhost.com (Postfix) with SMTP
id 780AB12DA19; Mon, 24 Oct 2005 14:32:47 -0700 (PDT)
Received: from chrisjj.com ([127.0.0.1])
by [127.0.0.1] with SMTP (SpamPal v1.591)
sender chrisjj@chrisjj.com; 24 Oct 2005 22:32:50 +0100
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Date: Mon, 24 Oct 2005 22:32 +0100 (BST)
From: chrisjj@chrisjj.com (Chris John Jordan)
Subject: Re: Swango = Swing + Argentine Tango = Nuevo Tango.
To: antonazar@hotmail.com
Cc: chrisjj@chrisjj.com
In-Reply-To: BAY102-DAV14A8FE9CD947E354F72F66BD730@phx.gbl
Reply-To: chrisjj@chrisjj.com
Message-Id: memo.20051024223250.804C@chrisjj.com


#8

The key point is whether there were multiple recipients when the DH server received the message. In this case, it looks like the message was sent twice; once with a single recipient and once with multiple. It could be that there were 2 different target domains involved; even though both were hosted at DH, the sending server probably would use different connections.


#9

In your second example, there are multiple recipients in the same SMTP transaction, since you’re sending to both an external destination and a local destination in your message. It’s a tricky example because the DH mail server is (in this case) both accepting the mail from you (as an authenticated client), and delivering it locally. So your mail client is sending RCPT TO for both; the mail server is queuing the one for an external destination and sending it out (probably with a different queue-id) and delivering yours to its final destination (your mailbox). Same deal - multiple envelope-recipients in the original SMTP transaction opening up a connection to the DH mail server.

The second case seems (AFAICT) to have only a single recipient - you.

But again, I’d try looking at messages from outside sources - and in those cases, it can be very hard to tell if there were multiple recipients or not (unless you are the sender).

You could do some experiments by sending yourself messages to different addresses at domains you host from an outside account (e.g., hotmail, gmail) - if you CC or BCC multiple recipients, you should not see that “for…” info in the Received line; if you send to a single recipient, you should see it.