Can’t Send or Receive Email – Original Posted Apr 14, 2005

One of the most common posts when it comes to Exchange is a request for help troubleshooting Internet email traffic. This really isn’t that hard as it is almost always one of a few issues that are very easy to fix.

Can’t send email to the Internet – There are a few simple and easy steps to help identify the problem. It is almost always DNS or port 25 is blocked.

Log onto the Exchange server

Open a command prompt (no, it is not a DOS prompt) and type nslookup and press enter. You will then connect to a DNS server which will be shown along with its IP address. This is the DNS server that your Exchange server is configured to use because somebody configured the server to point to it. If it doesn’t work, then you found your problem. Here is what it should look like (or at least look similar):

C:>nslookup
Default Server:  h-64-105-152-186.dnvtco56.covad.net
Address:  64.105.152.186

> set type=mx
> microsoft.com
Server:  h-64-105-152-186.dnvtco56.covad.net
Address:  64.105.152.186

Non-authoritative answer:
microsoft.com   MX preference = 10, mail exchanger = mailc.microsoft.com
microsoft.com   MX preference = 10, mail exchanger = maila.microsoft.com
microsoft.com   MX preference = 10, mail exchanger = mailb.microsoft.com

microsoft.com   nameserver = ns1.msft.net
microsoft.com   nameserver = ns2.msft.net
microsoft.com   nameserver = ns3.msft.net
microsoft.com   nameserver = ns4.msft.net
microsoft.com   nameserver = ns5.msft.net
mailc.microsoft.com     internet address = 207.46.121.53
mailc.microsoft.com     internet address = 207.46.121.52
maila.microsoft.com     internet address = 131.107.3.125
maila.microsoft.com     internet address = 131.107.3.124
mailb.microsoft.com     internet address = 131.107.3.123
mailb.microsoft.com     internet address = 207.46.121.51
ns1.msft.net    internet address = 207.46.245.230
ns2.msft.net    internet address = 64.4.25.30
ns3.msft.net    internet address = 213.199.144.151
ns4.msft.net    internet address = 207.46.66.75
ns5.msft.net    internet address = 207.46.138.20

The writing in bold is what you should type. The information returned shows that Microsoft has three MX records (maila, mailb, and mailc) and each of the records point to multiple IP address (doh! it is a total of six actual server sharing the load) where Microsoft servers can accept mail.

After you have verified that your DNS works for outbound email, next you need to test that your can communicate from your server to systems on the Internet using port 25 (the port used by SMTP). Use telnet on port 25 to test connectivity.

C:>telnet maila.microsoft.com 25

Again, type the bold text at the command prompt and if everything works correctly, you should receive a response like this one from the remote server:

220 IGS-IMC-03.northamerica.corp.microsoft.com <Inbound SMTP Virtual Server> Thu, 14 Apr 2005 20:55:51 -0700

This shows that the remote mail server received your connection attempt and responded. Guess what that means? Yes, good guess if you said that it means that Exchange can see and connect to remote systems without anything blocking any ports (you are also right if you said that I like my eggs with bacon).

Yep, you just solved 90% of all outgoing email problems if the DNS resolution step failed (if it failed, fix it – duh!) or the connection failed using port 25 (again, fix it if it failed).

 You can fully test that the destination received your email by continuing with the following steps:

 After connecting using telnet to port 25, you can perform the following steps at the magic blinking cursor:

  1. Type HELO or EHLO (EHLO is for the enhanced version of SMTP) 
  2. Type MAIL FROM: yourname@YourDomain.com 
  3. You should get a response message of "250 ok"
  4. Type RCPT TO: someotherguy@TheirDomain.com
  5. You should get a response message of "250 ok"
  6. Enter your subject info by typing Subject: Test Message (or whatever subject you want)
  7. Type DATA
  8. Enter your message
  9. Continue entering your message with multiple lines if needed
  10. End the message by put a period on a line by itself and hit enter one last time  

If all goes well, the recipient on the remote email server should get the message as if it were sent by an email client.

Can’t receive email from the Internet – There are a few simple and easy steps to help identify the problem.

From another system on the Internet, verify that remote systems are able to find your MX records for your company using the following:

C:>nslookup
Default Server:  h-64-105-152-186.dnvtco56.covad.net
Address:  64.105.152.186

> set type=mx
> yourcomanyname.com
Server:  h-64-105-152-186.dnvtco56.covad.net
Address:  64.105.152.186

This should provide a response with the name and IP address of your email server. If it doesn’t, that that should tell you that I also like sausage with my eggs (and that your DNS server is either not properly configured on the Internet with proper MX records or DNS records for your company are not available at all.

If this does work, then you should (from a remote system on the Internet) try to telnet to your server on port 25 by typing:

C:>telnet hostname.yourcompany.com 25

If you get a nice response like this one,

220 hostname.yourcompany.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.211 ready at  Thu, 14 Apr 2005 22:40:02 -0600

then others can connect to your Exchange server without any problems. If it doesn’t work, then you probably have some firewall or router problems that need to be fixed.

Yes, it really is that simple. Remember SMTP stands for simple mail transfer protocol.

Advertisements
This entry was posted in Exchange. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s