When I want to check if an IMAP server is working properly, I telnet it and run basics commands.
Here are (IMAP) commands that I keep using.
Table of Contents
Either connect to the IMAP (clear text) port:
# telnet FQDN 143
Or connect to the TLS IMAP port:
# openssl s_client -connect FQDN:993
In both case, the server should reply something like:
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN] Dovecot ready.
when it is ready to play with you.
Logging in and out
Enter your user credentials:
. login username password . OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
And log-out when you’re done:
. logout * BYE Logging out . OK Logout completed. closed
You can list your e-mail folders as follow:
. list "" "*" * LIST (HasNoChildren) "." "Trash" * LIST (HasNoChildren) "." "Sent" * LIST (HasNoChildren) "." "Drafts" * LIST (HasNoChildren) "." "INBOX" . OK List completed.
You can get information on the folders using the following command:
. status Trash (messages) * STATUS "Trash" (MESSAGES 55) . OK Status completed. . status INBOX (unseen) * STATUS "INBOX" (UNSEEN 32) . OK Status completed.
That’ll be enough to test my IMAP server.
More commands are described in Bob Peers’s excellent “Accessing IMAP email accounts using telnet” article.
That’s All Folks!
Source: Accessing IMAP email accounts using telnet.