Since our mail services are fully encrypted/secured, the best way to test a connection to our mail services is with openssl. This command will be built in to the "terminal" app on macOS and Linux, however if you're running Windows, you will need to install OpenSSL command line binaries as described here.
The following is the template for the command we'll be using to test this. The square brackets mean that part is optional and only to be used when designated further down this article.
openssl s_client -connect server_hostname:port [-starttls smtp]
(Be sure to replace the server_hostname and port values with the actual server hostname and port).
1. Testing StartTLS Connections (Port 587 Only)
The port to use for optimal communications with our outgoing mail connectivity (SMTP) is 587, however this does not support SSL, rather only StartTLS. To test this successfully we need to tell the openssl connection to specifically use StartTLS:
openssl s_client -connect basil.websavers.ca:587 -starttls smtp
A successful connection results in simply:
CONNECTED(00000005)
It will then pause and wait for you to continue sending commands to the server -- we don't need to do this, so you can then press CTRL-C on your keyboard to kill the connection.
2. Testing SSL Connections
You can run this command to test connections via IMAP with port 993, POP with port 995, or SMTP on port 465. Example for IMAP:
openssl s_client -connect basil.websavers.ca:993
Look for a successful connection report near the end like this:
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Start Time: 1565450888
Timeout : 7200 (sec)
Verify return code: 0 (ok)
It will then pause and wait for you to continue sending commands to the server -- we don't need to do this, so you can then press CTRL-C on your keyboard to kill the connection.
If you see an error, please report it by either appending the complete output to your existing ticket, or to a new ticket.