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

postfix delivers to X-Original-To as a recipient

1,377 views
Skip to first unread message

John Doe

unread,
Jul 18, 2012, 4:28:02 AM7/18/12
to
Hello,
A few days ago i received a email that has a send and a received
(from/to) field set to some...@gmail.com, and in the header the
X-Original-To is set to myad...@mydomain.com and this mail gets
delivered to my account.

In the header i can see :

Return-Path: <some...@gmail.com>
X-Original-To: myad...@mydomain.com
Delivered-To: myad...@mydomain.com
Received: from mail-ob0-f174.google.com

MIME-Version: 1.0
Subject: this is test mail
From: a b <some...@gmail.com>
To: some...@gmail.com

And in the maillog:

Jul 16 08:53:51 mailgate postfix/qmgr[45715]: 70781F50B7E:
from=<some...@gmail.com>, size=1819, nrcpt=1 (queue active)
Jul 16 08:53:51 mailgate postfix/virtual[92506]: 70781F50B7E:
to=<myad...@mydomain.com>, relay=virtual, delay=18,
delays=18/0/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)

How can this happened? Can you tell me if it is a postfix
missconfiguration on my part?

Thank you

John Doe

unread,
Jul 18, 2012, 6:38:24 AM7/18/12
to
Thank you!

Wietse Venema

unread,
Jul 18, 2012, 6:45:51 AM7/18/12
to
John Doe:
> Hello,
> A few days ago i received a email that has a send and a received
> (from/to) field set to some...@gmail.com, and in the header the
> X-Original-To is set to myad...@mydomain.com and this mail gets
> delivered to my account.

Postfix delivers mail to the ENVELOPE recipient address (the
address in the RCPT TO command, or the address on the Postfix
sendmail command line), NOT to the address in the header.

Wietse

John Doe

unread,
Jul 18, 2012, 6:58:16 AM7/18/12
to
Thank you for answering and sorry for the double posting.
How can i debug this issue?
How can i stop postfix from delivering mail to the recipient mentioned
in the x-original-to field?

Mark Goodge

unread,
Jul 18, 2012, 7:03:41 AM7/18/12
to
On 18/07/2012 11:58, John Doe wrote:
> On Wed, Jul 18, 2012 at 1:45 PM, Wietse Venema <wie...@porcupine.org> wrote:
>> John Doe:
>>> Hello,
>>> A few days ago i received a email that has a send and a received
>>> (from/to) field set to some...@gmail.com, and in the header the
>>> X-Original-To is set to myad...@mydomain.com and this mail gets
>>> delivered to my account.
>>
>> Postfix delivers mail to the ENVELOPE recipient address (the
>> address in the RCPT TO command, or the address on the Postfix
>> sendmail command line), NOT to the address in the header.
>>
>> Wietse
>
> Thank you for answering and sorry for the double posting.
> How can i debug this issue?

There's nothing to debug. The system is behaving as designed.

> How can i stop postfix from delivering mail to the recipient mentioned
> in the x-original-to field?

You can't. That's who the sender intended it to go to.

If the reason you want to block that mail is because it's spam, then
that's a valid concern. But it's also a different issue, entirely
unrelated to how Postfix (or any other MTA) routes mail.

Mark
--
Sent from my Turing-Flowers Colossus
http://mark.goodge.co.uk

John Doe

unread,
Jul 18, 2012, 7:10:36 AM7/18/12
to
Yes, but i cannot explain myself how did i received a message that has
the sender address some...@gmail.com and the same as the
destination address (also some...@gmail.com).
How can i dig down deeper and figure this out?

Reindl Harald

unread,
Jul 18, 2012, 7:11:31 AM7/18/12
to


Am 18.07.2012 12:58, schrieb John Doe:
> On Wed, Jul 18, 2012 at 1:45 PM, Wietse Venema <wie...@porcupine.org> wrote:
>> John Doe:
>>> Hello,
>>> A few days ago i received a email that has a send and a received
>>> (from/to) field set to some...@gmail.com, and in the header the
>>> X-Original-To is set to myad...@mydomain.com and this mail gets
>>> delivered to my account.
>>
>> Postfix delivers mail to the ENVELOPE recipient address (the
>> address in the RCPT TO command, or the address on the Postfix
>> sendmail command line), NOT to the address in the header.
>>
>> Wietse
>
> Thank you for answering and sorry for the double posting.
> How can i debug this issue?
> How can i stop postfix from delivering mail to the recipient mentioned
> in the x-original-to field?

you still refuse to understand how e-mail works

* there is nothing to debug
* the mail is delivered correctly
* delivery goes ALWAYS to envelope
* mail-headers are completly uninteresting for any MTA

signature.asc

Robert Schetterer

unread,
Jul 18, 2012, 7:18:14 AM7/18/12
to
Am 18.07.2012 13:10, schrieb John Doe:
> On Wed, Jul 18, 2012 at 2:03 PM, Mark Goodge <ma...@good-stuff.co.uk> wrote:
>> On 18/07/2012 11:58, John Doe wrote:
>>>
>>> On Wed, Jul 18, 2012 at 1:45 PM, Wietse Venema <wie...@porcupine.org>
>>> wrote:
>>>>
>>>> John Doe:
>>>>>
>>>>> Hello,
>>>>> A few days ago i received a email that has a send and a received
>>>>> (from/to) field set to some...@gmail.com, and in the header the
>>>>> X-Original-To is set to myad...@mydomain.com and this mail gets
>>>>> delivered to my account.
>>>>
>>>>
>>>> Postfix delivers mail to the ENVELOPE recipient address (the
>>>> address in the RCPT TO command, or the address on the Postfix
>>>> sendmail command line), NOT to the address in the header.
>>>>
>>>> Wietse
>>>
>>>
>>> Thank you for answering and sorry for the double posting.
>>> How can i debug this issue?
>>
>>
>> There's nothing to debug. The system is behaving as designed.
>>
>>
>>> How can i stop postfix from delivering mail to the recipient mentioned
>>> in the x-original-to field?
>>
>>
>> You can't. That's who the sender intended it to go to.
>>
>> If the reason you want to block that mail is because it's spam, then that's
>> a valid concern. But it's also a different issue, entirely unrelated to how
>> Postfix (or any other MTA) routes mail.
>
> Yes, but i cannot explain myself how did i received a message that has
> the sender address some...@gmail.com and the same as the
> destination address (also some...@gmail.com).
> How can i dig down deeper and figure this out?

read this

http://en.wikipedia.org/wiki/Email#Message_header

>
>> Mark
>> --
>> Sent from my Turing-Flowers Colossus
>> http://mark.goodge.co.uk
>>
>>


--
Best Regards
MfG Robert Schetterer

Charles Marcus

unread,
Jul 18, 2012, 7:21:15 AM7/18/12
to
On 2012-07-18 7:11 AM, Reindl Harald <h.re...@thelounge.net> wrote:
> Am 18.07.2012 12:58, schrieb John Doe:
>> Thank you for answering and sorry for the double posting.
>> How can i debug this issue?
>> How can i stop postfix from delivering mail to the recipient mentioned
>> in the x-original-to field?

> you still refuse to understand how e-mail works
>
> * there is nothing to debug
> * the mail is delivered correctly
> * delivery goes ALWAYS to envelope
> * mail-headers are completly uninteresting for any MTA

Well, one more comment might clear things up for the OP.

It is trivial to FORGE email headers (what you are seeing as the from
and to are in the headers), and it is not much harder to forge the
envelope sender...

Welcome to the world of email...

--

Best regards,

Charles

Mark Goodge

unread,
Jul 18, 2012, 7:21:30 AM7/18/12
to
On 18/07/2012 12:10, John Doe wrote:
> On Wed, Jul 18, 2012 at 2:03 PM, Mark Goodge <ma...@good-stuff.co.uk> wrote:
>> On 18/07/2012 11:58, John Doe wrote:
>>>
>>
>>> How can i stop postfix from delivering mail to the recipient mentioned
>>> in the x-original-to field?
>>
>>
>> You can't. That's who the sender intended it to go to.
>>
>> If the reason you want to block that mail is because it's spam, then that's
>> a valid concern. But it's also a different issue, entirely unrelated to how
>> Postfix (or any other MTA) routes mail.
>
> Yes, but i cannot explain myself how did i received a message that has
> the sender address some...@gmail.com and the same as the
> destination address (also some...@gmail.com).
> How can i dig down deeper and figure this out?

The "To:" address is not the destination address. The destination
address is the envelope address.

In many cases, particularly when sending mail between two individuals,
the To address and the envelope address are the same. But they are not
necessarily so.

Look at the headers of this email. Note that the To address is the
address of the list. But you have still received it. That's because the
list software remailed it to you, with your address in the envelope, but
keeping the original address in the To line.

In your example, someone sent you a mail with your address in the
envelope, but their own address in the To line. That's easy to do with
almost any email software. There is nothing special about it at all.

Reindl Harald

unread,
Jul 18, 2012, 7:22:35 AM7/18/12
to
PLEASE DO NOT REPLY OFF-LIST

Am 18.07.2012 13:18, schrieb John Doe:
>>> Thank you for answering and sorry for the double posting.
>>> How can i debug this issue?
>>> How can i stop postfix from delivering mail to the recipient mentioned
>>> in the x-original-to field?
>>
>> you still refuse to understand how e-mail works
>>
>> * there is nothing to debug
>> * the mail is delivered correctly
>> * delivery goes ALWAYS to envelope
>> * mail-headers are completly uninteresting for any MTA
>>
>
> Could you point me to the right documentation so i can understand this?
> Thank you!

http://djce.org.uk/about-email-envelopes
http://tools.ietf.org/html/rfc821

the envelope are the "MAIL FROM" and "MAIL TO" commands on
SMTP level, this is how mail-servers speaking

Any HEADERS are not part of the envelope and are completly
uninteresting from the protocol view




signature.asc

John Doe

unread,
Jul 18, 2012, 7:57:49 AM7/18/12
to
I understand now, thank you for your answers!

0 new messages