Task: check the functionality of an IMAP server at a low level, by yourself, without mail clients, by communicating with it via telnet.
Well then, let's connect to our server and have the following exchange with it (instead of mail.myserver.ru substitute the actual server name, and instead of webadmin@myserver.ru - a real mailbox):
Trying mail.myserver.ru...
Connected to mail.myserver.ru.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN AUTH=CRAM-MD5] Dovecot ready.
a001 login webadmin@myserver.ru "MySuperPassword" # Log in
a001 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
a142 select inbox # Select the "Inbox" folder
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $MDNSent $Forwarded)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $MDNSent $Forwarded \*)] Flags permitted.
* 3825 EXISTS
* 0 RECENT
* OK [UNSEEN 3624] First unseen.
* OK [UIDVALIDITY 1299362650] UIDs valid
* OK [UIDNEXT 9243] Predicted next UID
* OK [HIGHESTMODSEQ 14873] Highest
a142 OK [READ-WRITE] Select completed.
a932 examine inbox # Current state of the folder
* OK [CLOSED] Previous mailbox closed.
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $MDNSent $Forwarded)
* OK [PERMANENTFLAGS ()] Read-only mailbox.
* 3825 EXISTS
* 0 RECENT
* OK [UNSEEN 3624] First unseen.
* OK [UIDVALIDITY 1299362650] UIDs valid
* OK [UIDNEXT 9243] Predicted next UID
* OK [HIGHESTMODSEQ 14873] Highest
a932 OK [READ-ONLY] Select completed.
a004 list "/" * # Perform a listing
a004 OK List completed.
a654 fetch 1 body # Fetch the message body
Comments