This port is normally only for receiving email but for test purpose on the localhost, it should be permitted to send an email.
nc localhost 25
set localecho set logfile c:\TelnetTest.txt telnet localhost 25
The submission port (ie where you can submit an email) is on:
- 487 with SSL
- and nowadays on 587 with TLS
Openssl has support for TLS over SMTP.
openssl s_client -connect server.example.com:587 -starttls smtp
After a successful connection, the SMTP server responds with a banner
220 server.example.com ESMTP Postfix
The remote SMTP client may introduce itself by giving its fully qualified domain name with the EHLO command (Extended HELO)
The SMTP server answer by advertising its configuration
250-server.example.com 250-PIPELINING 250-SIZE 10240000 250-AUTH DIGEST-MD5 PLAIN CRAM-MD5 ...
The SMTP command that defines the email and finish with a .
MAIL FROM:<[email protected]> RCPT TO: <[email protected]> NOTIFY=success,failure DATA Subject: Test email Body of the email .
- HELP - Get list of command
- HELO, - same as EHLO (deprecated)
of the SMTP client, if one is available.
- MAIL FROM, Identifies the sender
- VRFY , verify the username exists on server
- RCPT TO, Identifies the recepient
- DATA (identified start of the message ie followed by a the body email
- SEND - send message to terminal
- RSET - Reset, abort connection and discard info
- NOOP - No operations, only elicits an OK from the server
Generally forbidden (postconf.5.html)
- AUTH LOGIN (then username password)