KNOWNHOST KNOWLEDGE BASE

Hosting Question? Find the Solution - Browse our Guides, Articles, and How-To's

Testing Remote SMTP / Mail Server Connections

Category: Getting Started
Tags: # # # # #

When attempting to resolve mail server errors/issues, being able to test the connection to a remote SMTP server is a critical step.

Testing a remote SMTP / mail server connection should be done from both a local machine (computer) and the server experiencing the issue.

  • If a connection can be made from both locations, the error is most likely not connectivity related.
  • If a connection can be made from a local machine, but NOT from the server (sending the mail), the issue is with the mail server sending the mail. You’ll want to review firewall settings or check IP blacklist information.
  • If a connection can NOT be made from either machine, it is most likely an issue with the remote (receiving) mail server and not resolvable.

Testing with Telnet

From your terminal (shell) window perform the following:

Dig for the MX record of the domain the email is being sent to. Eg. user@hotmail.com

  dig MX hotmail.com +short
  5 mx2.hotmail.com.
  5 mx3.hotmail.com.
  5 mx4.hotmail.com.
  5 mx1.hotmail.com.

Any of the listed will work, for this we’ll use mx1.hotmail.com. Now, let’s attempt the connection via port 25.

  telnet mx1.hotmail.com 25

The referenced command should respond with something similar to the following if the connection was SUCCESSFUL:

  Trying 65.54.188.126...
  Connected to mx1.hotmail.com.
  Escape character is '^]'.
  220 BAY004-MC4F30.hotmail.com Sending unsolicited commercial or bulk e-mail to Microsoft's computer network is prohibited. Other restrictions are found at http://privacy.microsoft.com/en-us/anti-spam.mspx. Sun, 1 Feb 2015 08:27:01 -0800

If the connection was NOT successful, you’ll see something like this:

  Trying 65.54.188.126...
  telnet: Unable to connect to remote host: Connection refused

Testing SMTP with MX Toolbox

It’s not my preferred method, however you can always try external services for SMTP server diagnostics.

Vist MXToolBox’s Email Server Test and provide the remote mail server (eg. mx1.hotmail.com) for a diagnostic report.