Trying to Set up SMTP Server on WIndows Server 2012

Posted by datc on Server Fault See other posts from Server Fault or by datc
Published on 2012-10-20T21:02:18Z Indexed on 2012/10/20 23:05 UTC
Read the original article Hit count: 182

Filed under:

I'm working on a website, and I need to test the functionality of sending email messages from ASP.NET, something like this:

Dim msg As New MailMessage("email1", "email2")

msg.Subject = "Subject"<br>
msg.IsBodyHtml = True<br>
msg.Body = "Click <a href='site'>here</a>."

Dim client As SmtpClient = New SmtpClient()

client.Host = "My-Server"<br>
client.Port = 25<br>
client.DeliveryMethod = SmtpDeliveryMethod.Network<br>
client.Send(msg)

This is running from a Windows 8 workstation.

I've installed SMTP server on my Windows Server 2012 machine. The mail shows up in the mailroot/Queue folder and sits there, eventually getting deposited into Badmail.

Now I have AT&T U-verse at home, and a few devices connected to the gateway, including let's call it "My-Server."

When I run SmtpDiag from say, datc@... to [email protected] I get SOA serial number match passed, Local DNS (99-135-60-233.lightspeed.bcvloh.sbcglobal.net) & Remote DNS (hotmail.com) tests *not* passed, and ultimately, Connecting to the server failed. Error: 10060. Failed to submit mail to mx2.hotmail.com error.

When I set My-Server's IP to static and equal to the external IP, 99.135.60.233, and again run SmtpDiag, I get SOA, Local DNS, and Remote DNS tests passed, but the same 10060 error.

Same for yahoo.com, gmail.com, and so forth.

Is it my ISP's job to fix this? Some PTR record missing somewhere? Is it at all possible to have a home-based SMTP server? All I want is to test my email code. Perhaps, my IP address is just not "trusted" somehow.

Thanks.

© Server Fault or respective owner

Related posts about smtp