Well that was a useful experience, cleaning up my mail through OpenSSL using http://busylog.net/telnet-imap-commands-note/#4.1 as my manual!
I did however connect like this: openssl s_client -crlf -connect MAIL_SERVER:993