SMTP (linux)

From Dave-Wiki
Revision as of 15:40, 26 November 2024 by Dave (talk | contribs)
Jump to navigation Jump to search

SMTP is a plain text protocol. This makes it easy to simulate a mail client with the telnet command to check the access to port 25.

Test Access to Mail Server with Telnet

Example:

 $ telnet localhost 25
 Trying ::1...
 Connected to localhost.
 Escape character is '^]'.
 220 corelogs.its.fsu.edu ESMTP Postfix
 ehlo localhost
 250-localhost
 250-PIPELINING
 250-SIZE 157286400
 250-VRFY
 250-ETRN
 250-STARTTLS
 250-ENHANCEDSTATUSCODES
 250-8BITMIME
 250-DSN
 250 SMTPUTF8
 mail from: no-reply@localhost
 250 2.1.0 Ok
 rcpt to: dave@davehome.net
 250 2.1.5 Ok
 data 
 354 End data with <CR><LF>.<CR><LF>
 Subject: Test
 
 Test body.     
 .
 250 2.0.0 Ok: queued as 3A83B1102528
 quit
 221 2.0.0 Bye
 Connection closed by foreign host.