Monday, January 5, 2009

Handy Free Tool to Test Connections to other Mail Servers - Time Saver Tip

Ehlo All,

When you need to test another mail server connection, to make sure it's accepting emails, I normally do the following: RDP to mail server, open telnet, open some ip:25 and then enter in smtp commands and make sure the other mail server accepts the email. I recently heard about a tool that expedites this process by handling DNS lookups, smtp commands, etc. It's called TestMX.

About TestMX. It's a very small free Windows application (command line, but don't be afraid, it's very easy). All you need to do is enter the domain to test, and it handles everything for you. The download is 2 files, help file and the .exe program. Below is what I did. I downloaded TestMX, and ran it against my domain (testmx -dreefsolutions.com). See, so easy. So, let's see what happens.

Play by Play
1) it performs a DNS lookup. It shows my local PC's DNS is 4.2.2.2 and 4.2.2.3.
2) it shows the MX records for reefsolutions.com, which are 3 servers.
3) attempts to connect to the lowest preference number (lower is priority connection). If it fails, the tool is suppose to attempt to connect to next preference number.
4) creates a connection to the MX record it found and is successful since the servers responds with "Spam Be Afraid" which indicates my server would be willing to accept more commands to send an email. This does NOT guarantee an email will be accepted though. It simply is testing that the other server is alive and responding.
5) quits connection.

D:\>testmx -dreefsolutions.com
Testing MX connection with domain reefsolutions.com
Using nameserver 4.2.2.2 4.2.2.3

MX for reefsolutions.com is spamcopcluster1.reefsolutions.com [69.31.40.115]
MX for reefsolutions.com is b.reefsolutions.com [72.68.143.91]
MX for reefsolutions.com is spamcopcluster2.reefsolutions.com [72.68.143.92]
Connecting with spamcopcluster1.reefsolutions.com [69.31.40.115]
Connection established with spamcopcluster1.reefsolutions.com [69.31.40.115]
< 220 Spam Be Afraid
> HELO BlackThunder
< 250 spamcopcluster1.reefsolutions.com Hello static-xx-xx-xx-xx.nycmny.fios.ve
rizon.net [xx.xx.xx.xx], pleased to meet you
> QUIT
< 221 Bye
Connection closed with spamcopcluster1.reefsolutions.com [69.31.40.115]

D:\>

Or, if you want to actually test sending of email you'll need to use an email client or perform the smtp commands by telnet. I recently found a better smtp command site than my old favorite (Microsoft's KB article on the process). Like I said before, the TestMX is only to insure the other mail server responds.

Old School way to test smtp (command by command). Favorite site to explain smtp command sending and is more accurate than the one below.
http://exchangeninjas.com/SpeakSMTP

Old Favorite for testing via smtp commands (XFOR: Telnet to Port 25 to Test SMTP Communication)
http://support.microsoft.com/kb/153119

-Ben

No comments: