If you ever need to inspect the certificate of a remote SMTP server, you can use the openssl
CLI tool.
If you need to check STARTTLS
:
openssl s_client -connect mail.example.com:25 -starttls smtp
Or, for a standard secure SMTP port:
openssl s_client -connect mail.example.com:465
To save the certificate to a file, just redirect the output:
openssl s_client -connect mail.example.com:25 -starttls smtp > mail.example.com.crt
You can also check SMTP TLS using MX Toolbox or Check TLS.
Many thanks for this post, really helped me. 🙂