Talking IMAP

Quick procedure to test that an IMAP account is working using telnet. Good for WordPress Postie plugin admins to know.

First, connect:

[me@mine ~]$ telnet 143
Connected to
Escape character is '^]'.
* OK The Microsoft Exchange IMAP4 service is ready.

Now login:

? LOGIN myname mypass
+ OK LOGIN completed.

List folders:

? LIST "" "*"
* LIST (\HasNoChildren) "/" Calendar
* LIST (\HasNoChildren) "/" Contacts
* LIST (\HasNoChildren) "/" "Deleted Items"
* LIST (\HasNoChildren) "/" Drafts
* LIST (\Marked \HasNoChildren) "/" INBOX
* LIST (\HasNoChildren) "/" Journal
* LIST (\HasNoChildren) "/" "Junk E-mail"
* LIST (\HasNoChildren) "/" Notes
* LIST (\HasNoChildren) "/" Outbox
* LIST (\HasNoChildren) "/" "Sent Items"
* LIST (\HasNoChildren) "/" Tasks
? OK LIST completed.

Check the Inbox:

* 314 EXISTS
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
? OK [READ-ONLY] EXAMINE completed.

Get the first message in the queue:


To logout and end the session:

* BYE Microsoft Exchange Server 2010 IMAP4 server signing off.
? OK LOGOUT completed.
Connection closed by foreign host.
This entry was posted in System Administration, Systems Analysis on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).