How to test the SMTP Server

How to test the SMTP Server

To make sure you understand all the details of what we are about to discuss, let’s define what SMTP is and what can be tested with it.

SMTP (Simple Mail Transfer Protocol) is the methodology behind the email workflow on the Internet. People have probably been wondering how emails get to their destination. SMPT fully covers it, implementing something similar to the mechanism of delivering an actual letter in an envelope. The SMTP server, or just a computer running SMPT, stands for a mail carrier of the Internet. The messages are sent directly to this server, which consequently delivers mails to their receivers. Quite convenient, isn’t it?

Various things can be tested with simply telneting into a given SMPT server:

  • is server working?
  • is it a firewall that blocks communication?
  • does the mail server allow for relaying of a particular domain or an email address?
  • what SMTP commands does the mail server support?
  • how much time does it take for a server to response?
  • does the server respond with the correct hostname?

How to test with a manual telnet session?

First, a telnet client has to be verified for the installation on the server. Then, you should search a mail server to log in to. We will need the DNS MX record for a given domain to proceed it. You can use something similar to the following command:


nslookup -type=mx


nslookup -type=mx
Non-authoritative answer:

Non-authoritative answer:	mail exchanger = 10	mail exchanger = 10	mail exchanger = 1	mail exchanger = 5	mail exchanger = 5

For the IP we are going to use, we need the DNS PTR. For this, we should start with the IP address the Internet sees us as having. Sites like this can be a perfect solution in this case.

Once you figured out your IP address, run the following command, with T.T.T.T standing for the IP address.


nslookup -type=ptr T.T.T.T


nslookup -type=ptr A.B.C.D


Non-authoritative answer:	name =

We now have two basic requirements – the MX record for and the PTR for the IP we will use. At this point, you can log in to the SMTP server. Use the following command to do it:

telnet 25

It will display something similar to the following code:

Connected to (
Escape character is '^]'.
220 (PowerMTA(TM) v4.0) ESMTP service ready
The first command to issue to the mail server is going to be EHLO or HELO, which is a basic greeting that initiates the communication between the SMTP server and the telnet client.

Something similar to the following should be returned: says hello
250-SIZE 54525952
250 DSN

The MAIL FROM command is going to be the next to issue. This command defines the address to which bounces are delivered. The “From” header is not the similar thing (the email address shown in an email client).

250 2.1.0 MAIL ok

We can send the RCPT TO command now that we the MAIL FROM command was sent. RCPT TO command determines to whom the message should be sent. This is both similar to and different than the “TO” header.

250 2.1.5 <> ok
Before starting the body of the message, you should run the DATA command. This command “explains” that all the other content, aside from previous, is the body of the message, including the headers.
354 send message

Some of the mail servers, including, support PIPELINING. It means that the SMTP mail server will wait until the DATA command is issued before responding to any other commands after the EHLO command. Enter the MAIL FROM, RCPT TO, and DATA commands before waiting for a response in this case.

Online Services for testing SMTP servers

For the beginning, you need to define the address of a SMTP server. You can use ns lookup command to do it or us some of the online services as

The SMTP check service will include several stages as following: checking your server DNS Black List status, verifying MX Records, relaying configurations, PTR Record, verifying the email address. We have got some online services that can help you examine the SMTP server:

MX Toolbox

MX Toolbox is a free service that will perform simple tests of:

  • SMTP Reverse DNS Mismatch
  • SMTP Valid Hostname
  • SMTP Banner Check
  • SMTP Connection Time
  • SMTP Open Relay
  • SMTP Transaction Time

However, you are not allowed to define the port, enter password etc. The number of tests is also limited.


Wormly gives you a free trial to check your SMTP servers, but does not allow defining the port or password, a secure connection is also not available.


SMTPer is indeed the most convenient solution that allows defining the port, provides users with a secure connection and authorization. You also can fill out both sender and recipient forms.

Test SMTP simply sends requests to SMTP servers to perform Relaying tests. This service does not have a sufficient toolkit for a proper SMTP examination.

Check SMTP works for certain parts of a process but isn’t enough for a proper examination. Does not provide a secure connection.

Check SMTP will run the following tests:

  • Check your server DNS Black List status
  • Verify MX Records
  • Relay Configuration
  • PTR Record (Reverse Lookup)
  • Verify Email Address

Leave a Reply

17 − 17 =