Wednesday, June 1, 2005

The ol’ port 25 telnet test


By David Gewirtz

Have you ever tried to send or receive email and had it fail? Sure, we all have. What do you do now? For many of us, we just wait a while and try again, to see if the server's back or the problem goes away.

But you can take a more proactive approach that'll give you some more detail. In fact, with a few simple command lines, you can learn whether your server is running and whether you can reach it.

The first step is determining what mail server you're using. At home, I get mail from our corporate ZATZ server, but I'm forced to send mail out through our cable modem ISP's mail server. Many ISPs do this and it can be very annoying. That said, sometimes their server goes down and if you can confirm it, you can save yourself a lot of work.

My cable modem comes from Cablevision and their mail server is at If you can't connect to the server, the first thing you're going to want to know is if there's a valid network connection to it. This is called a ping test.

Doing a ping

To ping a server, simply open up a DOS window (the easy way is to select Run from your start menu and type CMD). Once your DOS window is open, type "ping" followed by the address you want to test, as I do in Figure A.


I can reach the mail server. (click for larger image)

As you can see, the ping test returns four reply lines. If you get something like this, with the time= portion relatively low, you've got a good connection to the server.

In effect, from this one test, we know I'm connected to the Internet, I'm traveling through my router, I'm sending a packet to the server machine, it's running, it's on the network, and it can get replies back to me.

If you get a time-out message or some other message, you've got a connection problem of some sort. At that point, you'd want to diagnose whether it's at your ISP or on your own machine, or somewhere in-between.

Doing a port 25 telnet test

Now that you know the mail server box is running, it's time to see whether the server itself is willing or able to talk to you. Outbound email travels using SMTP (Simple Mail Transport Protocol), which travels over TCP (Transport Control Protocol) port 25.

What you want to do is see if you can talk over port 25 to your mail server. This is easy, using a one-line command. Just type the following:

telnet 25

You'll want to substitute the address with your own server.

Once you type this into your DOS window and hit return, you'll hopefully see some sort of response from your mail server, like that in Figure B.