Manually checking the certificate used for smtp on port 25


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » Email » Exim

Manually checking the certificate used for smtp on port 25Last Modified: Oct 31, 2019, 2:25 pm
As more servers and mail clients are requiring valid certificates for mail servers, you might need to view inside the certificate to see what's currently set.  You can do this by running the following command for your hostname:

openssl s_client -connect server.hostname.com:25 -starttls smtp -servername server.hostname.com

The "CN" value, or "Common Name" will be the current host value set inside the certificate.
You'll be looking for the subject *after* the certificate output, so in the case of our mail server, we have a wildcard, so the imporant bits would look like:

-----END CERTIFICATE-----
subject=/OU=Domain Control Validated/CN=*.directadmin.com



Once run, you'll actually be connected to the remote server, so to leave, just type:

QUIT

to exit the current SMTP session.

If it's a self-signed certificate, you'll see this in the "SSL-Session:" header:

   Verify return code: 18 (self signed certificate)


Note, the "-servername" is used to specify the ssl host, if your exim is running SNI to allow for multiple certificates.
 
Related Helpfiles
Installing an SSL certificate for your hostname using LetsEncrypt
Manually checking the certificate used for imap on port 143

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST