Access IMAP server from the command line using OpenSSL | Dev @ Work http://delog.wordpress.com/2011/05/10/access-imap-server-from-the-command-line-using-openssl/