I needed to check on whether a system was functioning as a mail server listening on the Simple Mail Transfer Protocol Secure (SMTPS) port, TCP port 465. One way to check is to attempt to establish a telnet connection to that port. E.g.:
$ telnet 192.168.248.91 465 Trying 192.168.248.91... Connected to esa.example.com Escape character is '^]'. ^C ^CConnection closed by foreign host. $
If you see a "connected to" message that indicates the system is listening on that port and you can terminate the connection by hitting Ctrl-C a couple of times. But you can also use an OpenSSL command as shown below to test SMTPS connectivity on TCP port 465:
$ openssl s_client -connect 192.168.248.91:465 -quiet depth=0 /OU=Zimbra Collaboration Server/CN=esa.example.com verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 /OU=Zimbra Collaboration Server/CN=esa.example.com verify error:num=27:certificate not trusted verify return:1 depth=0 /OU=Zimbra Collaboration Server/CN=esa.example.com verify error:num=21:unable to verify the first certificate verify return:1 220 esa.example.com ESMTP Postfix quit 221 2.0.0 Bye $
If you leave the -quiet
off the end of the command, you can
see additional information about the certificate on the email server.
Related articles: