Testing TLS Connectivity with OpenSSL - GMAIL SMTP
NOTE: for now as long as we get a command prompt we consider the connection to have passed (we are not doing any PROTOCOL testing. We are just checking TRANSPORT)
Port 465 is designated as STMPS or SMTP over SSL and we should be able to connect without the STARTTLS negotiation.
openssl s_client -connect smtp.gmail.com:465
If we try to connect to port 587 the same way we seem to get an error
openssl s_client -connect smtp.gmail.com:587
That is because there is nothing listening for SSL handshake messages and the handshake is not complete
If we add the -starttls smtp command we will be able to connect as the intial unsecure conversation will start a TLS session (like port 25)
openssl s_client -connect smtp.gmail.com:587 -starttls smtp