openssl s_client -starttls smtp -connect smtp.example.com:25 -servername smtp.example.com

Category: Mail Servers & Postfix

openssl s_client -starttls smtp -connect smtp.example.com:25 -servername smtp.example.com

Inspect the TLS certificate on port 25

Opens a raw TLS session over SMTP's STARTTLS and prints the certificate chain, validity dates, and cipher, which is how you confirm the MTA presents the right cert. -servername sets SNI for multi-cert servers. Type QUIT and Enter to exit.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.