Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just setup a Windows 2008 R2 server and am trying to get a basic mail server up and running so that I can send emails from my applications.

I setup a virtual SMTP server in IIS6 and tried doing a local telnet to port 25, which seemed to work fine. There were no errors during this stage and I can see the mail message appear in the Queue folder.

The problem is that mail never leaves the Queue folder. I then tried to telnet to a remote mail server on port 25 but couldn't connect:-

telnet 209.85.227.27 25

Could not open connection to the host, on port 25: Connection failed)

I checked my firewall and there is a default setting to allow all outgoing TCP traffic with no restriction. I even setup a specific rule for outgoing port 25 traffic but to no avail.

I then ran a SmtpDiag.exe command

 .\SmtpDiag.exe myemailaddress@serverdomain.com myemailaddress@gmail.com

and received the following output

Searching for Exchange external DNS settings.
Computer name is WIN-SERVERNAME.
Failed to connect to the domain controller. Error: 8007054b

Checking SOA for gmail.com.
Checking external DNS servers.
Checking internal DNS servers.
SOA serial number match: Passed.

Checking local domain records.
Checking MX records using TCP: gmail.com.
Checking MX records using UDP: gmail.com.
Both TCP and UDP queries succeeded. Local DNS test passed.

Checking remote domain records.
Checking MX records using TCP: gmail.com.
Checking MX records using UDP: gmail.com.
Both TCP and UDP queries succeeded. Remote DNS test passed.

Checking MX servers listed for myemailaddress@gmail.com.
Connecting to gmail-smtp-in.l.google.com [209.85.227.27] on port 25.
Connecting to the server failed. Error: 10060
Failed to submit mail to gmail-smtp-in.l.google.com.

Is there any other diagnostics I can do to figure out if it's my firewall or something else? I have removed antivirus to make sure that it wasn't causing the problem. Any ideas would be much appreciated.

share|improve this question
    
Can other machines telnet out to port 25? Could your ISP be blocking outgoing port 25 connections to anything other than their own SMTP servers? –  kaerast Jun 2 '10 at 21:17
    
I only have the one server so it's difficult to know for sure - it's a virtual server that I purchased from a virtual server hosting company in the UK. I've sent them an email to see if they block smtp but still waiting for a response. –  NickGPS Jun 2 '10 at 21:21

2 Answers 2

up vote 3 down vote accepted

It's most likly the firewall of the ISP. As a final check of your own firewall settings you could set it to disabled but if you've already opened it up and set an exception as well, there is no other "windows" reason that you can not telnet to port 25

share|improve this answer
    
I did what you suggested and disabled the firewall completely, but am still getting a connection error. I'll post back once I hear from the ISP. Thanks for the help so far. –  NickGPS Jun 2 '10 at 21:41
    
I'm fairly sure now that it's the provider blocking port 25 access. This makes plenty of sense now that I think about it, the last thing they want is someone setting up a bunch of virtual spam servers. I found a blog post from someone using the same service that had to agree to extra terms and conditions before being allowed to setup a mail server so I am expecting the same treatment when my support call is answered. –  NickGPS Jun 2 '10 at 22:10
    
Confirmed, I had to ask the ISP to unblock port 25 access and that did the trick. Thanks for your help –  NickGPS Jun 4 '10 at 10:53

If you are setting up a mail server you need a fixed IP address, and the related DNS setup. Otherwise you look like any other spambot running on your ISP's network. You will need your ISP to assist as they will need to setup the reverse DNS entry for your IP address.

If you don't have a fixed address use your ISP's relay. I don't know the incantation for Windows. Look for the routing tab which a radio button for route using dns. Select the option to route outgoing messages via an address. Enter your ISP's email relay here. The help may refer to this under smarthost.

Congratulations to your ISP for forbidding outgoing connections to port 25. I wish more ISPs did so.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.