I am running Windows server 2008 R2 Enterprise
with IIS 7.5 & 6.0
and the SMTP
service enabled. Following this guide, the SMTP
service was installed and configured to relay outbound emails via my personal gmail account:
IIS 6.0 (SMTP Virtual server #1)
outbound security
: basic authentication ([email protected] + password) +TLS
encryptionoutbound connections
: TCP port=587advanced
: Smart host = smtp.gmail.com
IIS 7.5 (SMTP E-mail)
E-mail address
: [email protected]SMTP Server
: smtp.gmail.comPort
: 587Specify credentials
: [email protected] + password
When I make a test with telnet:
220 SERVER Microsoft ESMTP MAIL Service, Version: 7.5.7601.17514 ready
ehlo
250-SERVER Hello [172.29.40.7]
250-TURN
250-SIZE 2097152
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250 OK
mail from:[email protected]
250 2.1.0 [email protected] OK
rcpt to:[email protected]
250 2.1.5 [email protected]
Data
354 Start mail input; end with <CRLF>.<CRLF>
Subject:Test subject
This is the email body
.
250 2.6.0 <SERVER> Queued mail for delivery
It does work but here is what I get in Gmail:
Return-Path: <[email protected]>
Received: from SERVER
by mx.google.com with ESMTPS id g9sm9663174wix.1.2013.04.17.06.20.48
(version=TLSv1 cipher=RC4-SHA bits=128/128);
Wed, 17 Apr 2013 06:20:49 -0700 (PDT)
Received: from ([127.0.0.1]) by SERVER with Microsoft SMTPSVC(7.5.7601.17514);
Wed, 17 Apr 2013 15:03:07 +0200
Subject: Subject:Test subject
From: [email protected]
Bcc:
Return-Path: [email protected]
Message-ID: <0000000a@SERVER>
X-OriginalArrivalTime: 17 Apr 2013 13:03:16.0990
Date: Wed, 17 Apr 2013 06:20:49 -0700 (PDT)
This is the email body
As you can see there are a several issues:
- the destination email ([email protected]) has become the source and the 1st return path
- there is no destination email anymore
- what I had setup as a source ([email protected]) is only present in the 2nd return path
Q1: Is someone able to explain why that is?
Also, I read on Google forums that there is a 500 emails / day
limit which means that even I manage to fix the above problems it still won't be good enough as I need to send more emails than that.
Q2: Is there a way (with or without IIS SMTP) to get the server to send emails directly to whatever the destination email address without going through a relay ?