Monday, May 17, 2010

Access Gmail POP via the command line

Since Google only supports connection using SSL, you can't just telnet to the relevant port (which is 995 instead of 110).

In order to connect, we need to make use of SSL.

In a nutshell, here's the command:

     openssl s_client -connect pop.gmail.com:995 -CApath /System/Library/OpenSSL/certs

I'm using the cert directory on Mac OS X. You'll need to put the path to your own cert directory depending on your OS (usually /etc/ssl/certs on linux).