Home

  Products   Downloads   FAQ  

Contact

     
     
 


Telnet port 25 / Telnet SMTP commands / Check SMTP Port

SMTP check port 25 with the Telnet command


You can check your SMTP Server on SMTP port 25 with the following Telnet commands:

Open a command line and type

telnet smtp-server.domain.com 25

You can also do this with PuTTY. Check the "Telnet" radio button and type 25 instead of 23 in the "Port" textbox.

If your server is online a connection will be established on port 25 (SMTP). An Exchange Server answers with the following output:

220
mailserver.domain.com Microsoft ESMTP MAIL Service ready at Wed, 20 Mar 2019 20:20:59 +0100

When you type the ‘help’ command the available commands are listed:

214-This server supports the following commands:
214 HELO EHLO STARTTLS RCPT DATA RSET MAIL QUIT HELP AUTH TURN ATRN ETRN BDAT VRFY


Do the following to send an E-Mail from the command line:   

220
mailserver.domain.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.5329 ready at  Wed, 20 Mar 2019 09:01:29 +0200

helo myserver.domain.com   # if nothing happens, repeat this
250 mailserver.domain.com Hello [10.1.11.133]

mail from:<myname@mydomain.com> 
250 2.1.0 myname@mydomain.com....Sender OK

rcpt to:<recipientname@mydomain.com>
250 2.1.5 Recipient OK

data
354 Start mail input; end with <CRLF>.<CRLF>

subject: This is a test mail
to: recipientname@mydomain.com
This is the text of my test mail.

.
250 2.6.0 <exchange.domain.com> Queued mail for delivery

quit

In newer Exchange versions the brackets are obsolete.
If the mailserver returns a "syntax error" after the "mail from:" command, you've probably forgotten to put the mail address in brackets <>. 


The better way to check SMTP port 25
(free command line tool, no installation required)

You can check TCP port 25 (and other ports) with the TCP PortCheck command line tool (www.portcheck-tool.com). It can be used like the Ping command:

PortCheck.exe MyServer 25

or continuous

PortCheck.exe -t MyServer 25

The result looks like this:


C:\Users\admin>portcheck -t smtp.office365.com 25
smtp.office365.com - Port 25 - OPEN - 30ms
smtp.office365.com - Port 25 - OPEN - 34ms
smtp.office365.com - Port 25 - OPEN - 40ms
smtp.office365.com - Port 25 - OPEN - 50ms
smtp.office365.com - Port 25 - OPEN - 47ms
smtp.office365.com - Port 25 - OPEN - 30ms

smtp.office365.com - Port 25 - closed
smtp.office365.com - Port 25 - closed
smtp.office365.com - Port 25 - closed
smtp.office365.com - Port 25 - closed
smtp.office365.com - Port 25 - closed

smtp.office365.com - Port 25 - OPEN - 30ms
smtp.office365.com - Port 25 - OPEN - 29ms
smtp.office365.com - Port 25 - OPEN - 41ms
smtp.office365.com - Port 25 - OPEN - 33ms
smtp.office365.com - Port 25 - OPEN - 30ms
smtp.office365.com - Port 25 - OPEN - 32ms
smtp.office365.com - Port 25 - OPEN - 30ms
smtp.office365.com - Port 25 - OPEN - 34ms
smtp.office365.com - Port 25 - OPEN - 30ms
smtp.office365.com - Port 25 - OPEN - 30ms


The Portcheck tool is also part of the PingTool software, which is also free. A ping tool with TCP portcheck, but also a Wake On Lan tool (Windows 11).

Another way to check port 25 (free tool)

If you would like to check your SMTP Server at regular intervals, you can use the command line tool SLCheck. SLCheck connects to the SMTP Server and checks the answer. Batch files can be executed in dependance of the result, e.g. to send alarm notifications. Try the following command:

SLCheck -p 25 -a your-server.com -r "220"

220 is the normal answer from a SMTP Server.

All results are logged in a logfile. You can monitor your SMTP Server by running SLCheck as a scheduled task, e.g. once a minute.

SLCheck Homepage

Content: Description of telnet smtp commands / How to telnet port 25 / Check SMTP Port

Do you already protect your USB interfaces from unknown devices? Read more about USB port security software for your organization!


www.devicetool.de - Gerätemanager Windows 10
Remote
www.device-tool.com - Device Manager Remote Windows 10
www.displaytool.de - Tail für Windows

German page: TCP Port Check Powershell with examples.