HomeSponsorTesting SMTP Server from the Command Line in Online Tools and via...

Testing SMTP Server from the Command Line in Online Tools and via Telnet


Key Takeaways
  • SMTP is a network protocol for email transmission in TCP/IP networks, with the SMTP server acting as the mailman.
  • Testing via telnet into an SMTP server allows assessing server operability, detecting firewalls, and checking supported commands.
  • Online tools like Wormly, MX Toolbox, Test SMTP, Check SMTP, and SMTPer offer various functionalities for testing SMTP servers securely and comprehensively.

Before you begin reading the article, let’s start with defining what SMTP is and what you can test with it.

SMTP (or Simple Mail Transfer Protocol) is a network protocol, designed for e-mail transmission in TCP/IP networks. The SMTP server is a mailman of the Internet. Basically, it helps emails get to the right destination. SMPT executes processes similar to the mechanism of delivering the actual mail. After you send an email, it gets to this server, which then delivers messages directly to their receivers.

By telneting into a given SMPT server, you can test a lot of things, for instance:

The operability of the server

Presence of a firewall that blocks communication

The list of SMTP commands that the mail server supports

Besides, you can also define the amount of time needed for a server to response, and check if the server responds with the right hostname.

Testing with a manual telnet session

Before starting testing smtp, a telnet client needs to be verified for the installation on the server. Then, begin searching a mail server to log in to. You are going to need the DNS MX record for your domain to proceed it. Use this 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

You need the DNS PTR for the IP you will be using. That’s why you should start with checking your current IP address. There are plenty of websites that can help you with this.

Then run the following command, replacing T.T.T.T with your IP address.


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


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


Non-authoritative answer:	name =

At this point, you have two basic requirements – the PTR for the IP you are going to use and the MX record for Now you can log in to the SMTP server by using this command:

telnet 25

You will see something like this 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 

Something like this should be returned: says hello
250-SIZE 54525952
250 DSN

The MAIL FROM command will be the next to issue. It shows the address where bounces are delivered.

250 2.1.0 MAIL ok

The MAIL FROM command was sent, now you can send the RCPT TO command. It determines the user to send the message.

250 2.1.5 <> ok
Before starting the body of the message, you should run the DATA command.
354 send message

There are mail servers, including, that support PIPELINING. This means that before responding to other commands after the EHLO command, the SMTP mail server will wait until the issuing of the DATA command. In this case, you should enter the MAIL FROM, RCPT TO, and DATA commands before waiting for a response.

The list of online services for testing SMTP servers

Before starting, you have to define the SMTP server’s address. To do it, use ns lookup command or some of the online services.

The SMTP check service will include the following stages: checking your server DNS Black List status, relaying configurations, verifying MX records, verifying the email address, PTR Record.

These online services will help you examine the SMTP server:


Wormly has a free trial to check SMTP servers, but it will not allow you define the password or port, and there’s no secure connection.

MX Toolbox

It’s a free service that will test SMTP Reverse DNS Mismatch, SMTP Transaction Time, SMTP Banner Check, SMTP TLS, SMTP Valid Hostname, SMTP Connection Time, and SMTP Open Relay. But you also will not be able to define the port or enter a password.


Test SMTP sends requests to SMTP servers for performing Relaying tests. It does not provide you a sufficient toolkit to examine SMTP properly.

Check SMTP

Check SMTP works for some parts of a process but a proper examination is not possible. Besides, this service doesn’t provide a secure connection.

Check SMTP can verify MX records, check your server DNS Black List status, verify email address, and run some other tests.


SMTPer is the best solution that gives you a secure connection and authorization and allows defining the port. You also can fill out recipient and sender forms.

Mukesh Bhardwaj
Mukesh Bhardwaj
Editor - An aspiring Web Entrepreneur and avid Tech Geek. He loves to cover topics related to iOS, Tech News, and the latest tricks and tips floating over the Internet.