Checking SSL/TLS encrypted IMAP connections

I needed to check an SSL encrypted IMAP connection because a customer wasn’t convinced it was working. I already used Outlook to test the connection, but I needed a telnet like test to show the problem was with the application. Telnet works with SMTP, but for an SSL encrypted IMAP connection I needed the OpenSSL client. These are the steps:

Download and install the latest version of openssl: http://slproweb.com/products/Win32OpenSSL.html

Start CMD and change the directory to:

cd OpenSSL-Win32\bin

#Start the client IMAP Session
openssl s_client -connect hostname:993

#Login in account mailbox
? LOGIN ACCOUNT PASSWORD
#or with a Mailbox Alias
? LOGIN DOMAIN/ACCOUNT/ALIAS PASSWORD

#Get folder list "FOLDER" "FILTER"
? LIST "" "*"

#Examine Inbox (or any other folder)
? EXAMINE INBOX

#Get Message
? FETCH 1 BODY

#Logout IMAP Session
? LOGOUT

If you want to know all the other possible commands, I suggest reading RFC 3501: https://tools.ietf.org/html/rfc3501

Leave a Reply

  

  

  


(Required)