Configure SMTP Virtual Servers to work with Specific IPs
I have a Windows 2008 server that hosts several websites, and have several programs that use CDOSYS to send emails. I have configured my SMTP server to send email, but the email is not being sent from the same IP the website is located on. So when I edit the SMTP Virtual Server to send from a specific internal IP instead of (All Unassigned), all of my email programs stop working. My code is below: Code to send email from website (classic ASP): 'Out going SMTP server myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1" myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 myCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 Set myMail.Configuration = myCon myMail.Send This works fine, but my email header looks like this: Received: from unknown (HELO VoterConnections.net) ([208.67.179.36]) by p3pismtp01-001.prod.phx3.secureserver.net with ESMTP; 13 Dec 2010 18:31:15 -0700 Received: from ColoWeb01 ([127.0.0.1]) by VoterConnections.net with Microsoft SMTPSVC(7.0.6002.18264); The problem is that 208.67.176.36 does not reverse DNS back to voterconnections.net. I'm not sure why the SMTP server is picking that IP address. So in my settings, I change the default SMTP server to use the local IP of that domain, say 192.168.1.15, instead of (All Unassigned). After I make that change and send an email via the CDOSYS, I get an error stating: ErrorCode 80040213 Description The transport failed to connect to the server. in my failedreqlogfiles. Why does this fail to connect when I assign it a specific IP?
December 13th, 2010 9:25pm

I have a Windows 2008 server that hosts several websites, and have several programs that use CDOSYS to send emails. I have configured my SMTP server to send email, but the email is not being sent from the same IP the website is located on. So when I edit the SMTP Virtual Server to send from a specific internal IP instead of (All Unassigned), all of my email programs stop working. My code is below: Code to send email from website (classic ASP): 'Out going SMTP server myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1" myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 myCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 Set myMail.Configuration = myCon myMail.Send This works fine, but my email header looks like this: Received: from unknown (HELO VoterConnections.net) ([208.67.179.36]) by p3pismtp01-001.prod.phx3.secureserver.net with ESMTP; 13 Dec 2010 18:31:15 -0700 Received: from ColoWeb01 ([127.0.0.1]) by VoterConnections.net with Microsoft SMTPSVC(7.0.6002.18264); The problem is that 208.67.176.36 does not reverse DNS back to voterconnections.net. I'm not sure why the SMTP server is picking that IP address. So in my settings, this "208.67.179.36" is the public ip address of your server ?Edoardo Benussi - Microsoft MVP Management Infrastructure - Systems Administration https://mvp.support.microsoft.com/Profile/Benussi Windows Server Italian Forum Moderator edo[at]mvps[dot]org
Free Windows Admin Tool Kit Click here and download it now
December 14th, 2010 9:00am

It is one of several IPs since I host several websites. But it is not the IP that matches the domain that is sending the email. That is why I'm trying to set the SMTP server to use the proper internal IP to match to the proper Extermal IP.
December 14th, 2010 2:32pm

this happens because the server, on which there are published web sites, has ip of router as default gateway and your smtp server sends mail from the first of public ip addresses that you have assigned. i think that you could resolve this problem setting an mx record on dns server of your mantainer for every web site (domain) that you publish. HTHEdoardo Benussi - Microsoft MVP Management Infrastructure - Systems Administration https://mvp.support.microsoft.com/Profile/Benussi Windows Server Italian Forum Moderator edo[at]mvps[dot]org
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2010 6:00am

How would I go about doing that? Do I need to create an SMTP Virtual server for each unique domain so that it translates to the proper domain in the email headers?
December 15th, 2010 1:29pm

Do I need to create an SMTP Virtual server for each unique domain so that it translates to the proper domain in the email headers? this would be a good solution.Edoardo Benussi - Microsoft MVP Management Infrastructure - Systems Administration https://mvp.support.microsoft.com/Profile/Benussi Windows Server Italian Forum Moderator edo[at]mvps[dot]org
Free Windows Admin Tool Kit Click here and download it now
December 17th, 2010 5:12am

I have tried to configure the mutiple SMTP servers, but still get connection errors when I try to send email. What do I need to change in my code to get it to work? Code to send email from website (classic ASP): 'Out going SMTP server myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1" myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 myCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 Set myMail.Configuration = myCon myMail.Send If I check the FailedReqLogs, I see that it doesn't connect to the new SMTP server I setup.
December 23rd, 2010 1:19am

I have tried to configure the mutiple SMTP servers, but still get connection errors when I try to send email. What do I need to change in my code to get it to work? Code to send email from website (classic ASP): 'Out going SMTP server myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1" you have to change this one with ip on which every smtp server is listening.Edoardo Benussi - Microsoft MVP Management Infrastructure - Systems Administration https://mvp.support.microsoft.com/Profile/Benussi Windows Server Italian Forum Moderator edo[at]mvps[dot]org
Free Windows Admin Tool Kit Click here and download it now
December 23rd, 2010 2:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics