Verify IMAP server SSL/TLS certificate
Do you wanna verify the configuration for your certificate in your IMAP server? It’s as easy as this:
openssl s_client -connect imap.csic.es:143 -starttls imap -CApath /etc/ssl/certs
Substitute ‘imap.csic.es’ with your server hostname or IP address.
The route for your root certificates (/etc/ssl/certs), which is necessary for verifying them, might vary depending on your linux distro. That route should be fine for debian and ubuntu based distros.