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.

  dig MX +short

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

  telnet 25

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

  Connected to
  Escape character is '^]'.
  220 Sending unsolicited commercial or bulk e-mail to Microsoft's computer network is prohibited. Other restrictions are found at Sun, 1 Feb 2015 08:27:01 -0800

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

  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. for a diagnostic report.