Telnet is your Friend
BySometimes the best troubleshooting tools are the simple ones. One of my personal favorites is Telnet. Here are just a few quick troubleshooting tasks that I routinely encounter for which Telnet is the first tool out of the box:
- Can’t send e-mail
- If you suspect a problem with mail delivery from the Exchange server, log on to the server, open a command prompt, and type ‘ telnet publicmailservername 25′ where publicmailservername is a well-known mail server, such as smtp1.google.com, maila.microsoft.com, etc. This checks several issues:
- DNS name resolution on the server (if there’s a problem, it won’t be able to find the mail server)
- Outbound network access (if you get no connection response, either the ISP has blocked outbound SMTP (which still happens, believe it or not) or something else is interfering with network transmission)
You can also telnet to port 25 on a mail server that’s not accepting mail from your site to see if you’ve been put on a blacklist or some other factor is blocking you. Doesn’t always show up in the SMTP logs.
- POP3 Connector problems
- To test that POP3 is working correctly, open a command prompt and type ‘telnet pop3mailhost 110′ where pop3mailhost is the name of the mail server hosting the POP3 account. Then type ‘user username‘ and press Enter. Then type ‘pass password‘ and press Enter. If the account settings are correct, you can type ‘list’ and see all the messages that are waiting for download, if any. You can also usually quickly figure out if the user has forgotten what password he or she was supposed to be using with their POP mail account.
- Poor man’s port scanner
- If you want to know if a port is open for access and you don’t want to run a full port scan against the server, open a command prompt and type ‘telnet servername portnumber‘ where servername is the server you want to check and portnumber is the, well, port number. If you get a “Connection refused” response, chances are that access to that port has been blocked somewhere, or that the service that is supposed to be listening to that port is not active.
Of course, you also need to know how to get out of a Telnet connection to a service that doesn’t actually have a text interaction. Press ^] (that’s Control right-square-bracket) after the telnet session has been made to bring up the Telnet menu. Then you can type “quit” and press Enter to close the connection and quit the Telnet client.
Another nice fact is that telnet clients exist on all current operating systems – Windows, Macintosh, and Linux, so no matter where you are, if you’ve got access to a computer on a network, you can test with Telnet even if none of your other “regular” tools are available.