Check Port 25 with the Telnet Command
can check your SMTP Server on SMTP port 25 with the following Telnet
Open a command line and type
If your server is
online a connection will be established on port 25 (SMTP).
An Exchange Server answers with the following output:
mailserver.domain.com Microsoft ESMTP MAIL Service, Version:
5.0.2195.5329 ready at Sat,
22 May 2006 08:34:14 +0200
When you type the ‘help’ command the available commands are
214-This server supports the
214 HELO EHLO STARTTLS RCPT DATA RSET MAIL QUIT HELP AUTH TURN ATRN
ETRN BDAT VRFY
Try the following to send an eMail from the command line:
ESMTP MAIL Service, Version: 5.0.2195.5329 ready at
Sat, 22 May 2006 09:01:29 +0200
mailserver.domain.com Hello [10.1.11.133]
2.1.0 email@example.com....Sender OK
Start mail input; end with <CRLF>.<CRLF>
This is a test mail
This is the text of my test mail.
2.6.0 <exchange.domain.com> Queued mail for delivery
the mailserver returns a "syntax error" after the
"mail from:" command, you've probably forgotten to put the
mail address in brackets <>.
better way to Check Port 25
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
-p 25 -a your-server.com -r "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.