3

I am using windows server 2008 r2 and IIS 7.5 normally. I am using IIS 6 smpt server to send emails. Right now when i send email via my C# application i am seeing 2 received from headers. What might be the cause of this ?

Displaying both gmail and hotmail headers

gmail :

Delivered-To: mypersonalemail@gmail.com
Received: by 10.112.29.167 with SMTP id l7csp43703lbh;
        Sat, 10 Mar 2012 08:16:29 -0800 (PST)
Received: by 10.14.127.12 with SMTP id c12mr1026618eei.19.1331396188791;
        Sat, 10 Mar 2012 08:16:28 -0800 (PST)
Return-Path: <noreply@monstermmorpg.com>
Received: from noreply.monstermmorpg.com (noreply.monstermmorpg.com. [85.17.154.139])
        by mx.google.com with ESMTP id f41si4528441eeo.146.2012.03.10.08.16.27;
        Sat, 10 Mar 2012 08:16:28 -0800 (PST)
Received-SPF: pass (google.com: domain of noreply@monstermmorpg.com designates 85.17.154.139 as permitted sender) client-ip=85.17.154.139;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of noreply@monstermmorpg.com designates 85.17.154.139 as permitted sender) smtp.mail=noreply@monstermmorpg.com
Received: from XCPV002 ([127.0.0.1]) by noreply.monstermmorpg.com with Microsoft SMTPSVC(7.5.7601.17514);
     Sat, 10 Mar 2012 16:16:28 +0000
MIME-Version: 1.0
From: "MonsterMMORPG"
 <noreply@monstermmorpg.com>
To: mypersonalemail@gmail.com
Date: 10 Mar 2012 16:16:28 +0000
Subject: =?utf-8?B?UG9rZW1vbkNyYWZ0IGRhaGEga2FsaXRlbGkgYmlyIG95dW4g?=
 =?utf-8?B?b2xhcmFrIGdlcmkgZMO2bmTDvC4gRXNraSBoZXNhYsSxbsSxeiBkdXJ1?=
 =?utf-8?B?eW9yLg==?=
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
Return-Path: noreply@monstermmorpg.com
Message-ID: <XCPV002ednHM3SOlbpH0004e7c7@noreply.monstermmorpg.com>
X-OriginalArrivalTime: 10 Mar 2012 16:16:28.0941 (UTC) FILETIME=[26372BD0:01CCFED9]

hotmail headers

x-store-info:sbevkl2QZR7OXo7WID5ZcaZ0jeT0hTF6w5JqyzrMGIIJ4/L/t2gj2cA4gOeWpl7k+VkJUhAu0L19pcdx17/6zH+umIRUQcxNC7a6JMdOu4uk+atrpASsFAd6JPSp2WMA
Authentication-Results: hotmail.com; sender-id=temperror (sender IP is 85.17.154.139) header.from=noreply@monstermmorpg.com; dkim=none header.d=monstermmorpg.com; x-hmca=none
X-Message-Status: n:0:n
X-SID-PRA: MonsterMMORPG <noreply@monstermmorpg.com>
X-DKIM-Result: None
X-AUTH-Result: NONE
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0xO0Q9MTtHRD0xO1NDTD0w
X-Message-Info: NhFq/7gR1vQcnWpWXvTdSPoVLSrfQUf9NNYiD+nue1hb767bbTKXz+tuMD66iU4vKsnCmrISnMcViv7BRc8FinIdJij0qRdzfb9MQFyl8Qnq2jH2yHHz6W3BUjjFUEclGZIdpMuV4EQ=
Received: from noreply.monstermmorpg.com ([85.17.154.139]) by BAY0-MC3-F1.Bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900);
     Sat, 10 Mar 2012 08:20:03 -0800
Received: from XCPV002 ([127.0.0.1]) by noreply.monstermmorpg.com with Microsoft SMTPSVC(7.5.7601.17514);
     Sat, 10 Mar 2012 16:20:03 +0000
MIME-Version: 1.0
From: "MonsterMMORPG"
 <noreply@monstermmorpg.com>
To: mypersonalemail@hotmail.com
Date: 10 Mar 2012 16:20:03 +0000
Subject: =?utf-8?B?UG9rZW1vbkNyYWZ0IGRhaGEga2FsaXRlbGkgYmlyIG95dW4g?=
 =?utf-8?B?b2xhcmFrIGdlcmkgZMO2bmTDvC4gRXNraSBoZXNhYsSxbsSxeiBkdXJ1?=
 =?utf-8?B?eW9yLg==?=
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
Return-Path: noreply@monstermmorpg.com
Message-ID: <XCPV002DreBBsQwY6YH0004e7c9@noreply.monstermmorpg.com>
X-OriginalArrivalTime: 10 Mar 2012 16:20:03.0608 (UTC) FILETIME=[A62AC180:01CCFED9]

If you check you will see that there are 2 received from headers. Let me also show how do i send email and my smtp server config

This is how i send email C#

            MailMessage mail = new MailMessage();
            mail.To.Add(srEmail);
            mail.From = new MailAddress("noreply@monstermmorpg.com", srSender);
            mail.Subject = srEmailTitle;
            mail.Body = srEmailBody;
            mail.IsBodyHtml = true;
            mail.SubjectEncoding = System.Text.Encoding.UTF8;
            mail.BodyEncoding = System.Text.Encoding.UTF8;
            SmtpClient smtp = new SmtpClient();
            smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
            smtp.UseDefaultCredentials = true;
            smtp.Host = "127.0.0.1";
            smtp.Port = 25;
            smtp.Send(mail);

This is IIS server config

enter image description here

Thanks a lot for the help

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
MonsterMMORPG
  • 546
  • 2
  • 9
  • 25

1 Answers1

3

You get one Received header for every SMTP server that handles your message. In your case you get one when your application connects via SMTP to localhost and injects the message for the first time, and a second header when that IIS system passes the email to the server for HotMail or GMail.

This is absolutely normal, and expected.

Daniel Pittman
  • 5,692
  • 1
  • 22
  • 20
  • I checked other emails i have received and they have only single header. Aren't there any way to remove second header which displays localhost ip. Thank you very much for the answer. – MonsterMMORPG Mar 10 '12 at 16:34
  • Do you mean other emails from your own software, or from third parties? The most common way to avoid the "Received from 127.0.0.1" header is to use something other than SMTP to submit the initial email. Letting the world know that you have a loopback interface isn't a big deal, though, since every computer everywhere has a 127.0.0.1 address... – Daniel Pittman Mar 10 '12 at 16:40
  • Well i have fear that it would increase dropping spam box chance. So you are saying it won't have any affect? Also i mean third parties not my softwares. – MonsterMMORPG Mar 10 '12 at 17:05
  • I can't say authoritatively if it will read like spam, but you would hardly be the first service in the world to end up with a local received header like that. – Daniel Pittman Mar 10 '12 at 17:09