Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a problem where someone has implemented a custom IMAP Server. I need to write a custom application to get a list of emails, and fetch messages. Problem is, every library I've tried to use fails with exceptions - BAD commands, etc. But using thunderbird, it retrieves the list of messages and can fetch messages. I would like to see what thunderbird is transmitting to make it work... The problem is, that this IMAP server is actually SSL secured so I can't just use wireshark to see the commands being sent.

I've tried to use thunderbird's logging mechanism, except its so verbose, and it looks like some of the commands are getting truncated - still can't make it work from these commands.

I've also tried to use sslh and sslstrip, but it seems these tools only work for HTTPS.

I've tried all day but still can't work it out! Aaaaghh!

How can I please find a way to log the requests and responses in an IMAPS session?

share|improve this question
up vote 7 down vote accepted

The answer is stunnel! Fantastic! So to make this work.....

In the config file make a new section:

 client = yes
 accept =
 connect =

Open thunderbird, change the account to standard IMAP without SSL and change the host server to localhost Log with wireshark and you'll be able to see the commands!

share|improve this answer
Good job on finding the answer ;) – Ion Jan 15 '12 at 13:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.