How to print SMTP port 587 STARTTLS certificate using openssl s_client
openssl s_client -starttls smtp -crlf -connect smtp,myserver.com:587 2>&1 </dev/null | sed --quiet '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | openssl x509 -noout -text
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow