telnet example.com 25. For secure SMTP, you can use one of following: openssl s_client -starttls smtp -connect example.com:25 openssl s_client -starttls smtp -connect example.com:465 openssl s_client -starttls smtp -connect example.com:587. As soon as you connect to the server, run: ehlo example.com. You will get output like below as reply:
How to verify that SSL for IMAP/POP3/SMTP works and a May 28, 2020 terminal - How to talk to IMAP server in Shell via OpenSSL A few more options to consider: You may be connecting to a server offering STARTTLS (esp. for IMAP on port 143) in which case you can tell openssl to proceed in negotiating this, you need to specify which protocol you're using (choose from pop3, imap, smtp, ftp); the -crlf option has been mentioned by others, and I also find the -showcerts option useful if I'm debugging an SSL/TLS configuration. Command Line Utilities - OpenSSL
Jun 04, 2018
openssl s_client -crlf -quiet -starttls smtp -connect email-smtp.us-west-2.amazonaws.com:587. In the preceding command, replace email-smtp.us-west-2.amazonaws.com with the URL of the Amazon SES SMTP endpoint for your AWS Region. For more information, see Regions and Amazon SES Binaries - OpenSSL
Windows: Install Telnet Client - CMD & PowerShell - ShellHacks
How to test SMTP Authentication and StartTLS - Sysadmins May 17, 2014 Using openssl instead of telnet to test HTTPS, POP3S