I often get to configure IMAP on mail environments. The easiest way to test if it works is to use telnet (using built-in orĀ Putty).

First, connect to port 143:

telnet IMAPserver.domain.com 143

Then run the following to authenticate, list mails and quit. Just change whatever you need in red, domain is not always needed if you have one domain.

* OK The Microsoft Exchange IMAP4 service is ready.
. LOGIN DOMAIN\username password
. OK LOGIN completed.
. SELECT Inbox
* 2 EXISTS
* 2 RECENT
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
* OK [UNSEEN 2] Is the first unseen message
* OK [UIDVALIDITY 10638] UIDVALIDITY value
* OK [UIDNEXT 220] The next unique identifier value
. OK [READ-WRITE] SELECT completed.
.
. LOGOUT

MoreĀ info.