Friday, December 6, 2013

Testing POP3 over SSL/TLS

Here I'm putting the necessary commands to connect to a POP3 server over SSL or TLS in both modes - pure SSL and STARTTLS. It's convenient sometimes for debugging to connect to a POP3 server on the command line to see what's going wrong. But it's not good to use an insecure connection or maybe you want to test exactly a secure connection.

So instead of telnet, here you use:
openssl s_client -host pop.example.com -port 995
For the STARTTLS variant:
openssl s_client -starttls pop3 -host pop.example.com -port 110

There you get the same prompt a telnet connection to plain 110 port would give you but running over a secure connection. BTW same technique can be used as well for SMTP, IMAP, HTTP or other connection you're testing on the command line. Nice and easy, no?