The openssl s_client command implements a generic SSL/TLS client which connects to a remote host using SSL/TLS. It is a very useful diagnostic tool for SSL servers. The following command will connect to the IMAPS service.
Command Reference:
IP: 10.10.10.1
Protocol: imaps
openssl s_client -connect 10.10.10.1:imaps