# Imap This section describes HOW : * to telnet into your IMAP "Dovecot" server, * to test (fast method) if your IMAP authentication process (login, password) is correct and working * to check if any Inbox exist, * to check if any other mailbox(es) exist, * to gracefully logout from telnet session. Syntax : openssl s_client -starttls imap -connect :143 Example : openssl s_client -starttls imap -connect example.com:143 Follow the process as outlined below for IMAP telnet-ting: **[1] To start telnet session,** * **type:** $ openssl s_client -starttls imap -connect example.com:143 Once your telnet session is successful, you shall see responses: Trying example.com... Connected to example.com. Escape character is '^]'. * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN] Dovecot ready. **[2] Telnet session shall wait for you to authenticate. To enter username and password,** * **type:** a login "username@example.com" "password" .......OR * **type:** a login "username" "password" _NOTE: The syntax of either or is dependent on the type of configurations you may have on your server._ Once your logon is successful, you shall see responses (details may differ + depends on server configurations, capabilities or features): a OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY PREVIEW STATUS=SIZE SAVEDATE LITERAL+ NOTIFY SPECIAL-USE] Logged in. **[3] To check if InBox exist,** * **type:** b select inbox If your Inbox exist, you shall see responses (details may differ + depends on server configurations): * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted. * 1 EXISTS * 1 RECENT * OK [UIDVALIDITY 1106186941] UIDs valid * OK [UIDNEXT 2] Predicted next UID b OK [READ-WRITE] Select completed. * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted. * 1 EXISTS * 1 RECENT * OK [UIDVALIDITY 1106186941] UIDs valid * OK [UIDNEXT 2] Predicted next UID b OK [READ-WRITE] Select completed. **[4] To check other mailbox(es) if they exist,** * **type:** c list "" * If your other mailbox(es) exist, you shall see responses (details may differ + depends on server configurations): * LIST (\HasNoChildren) "." INBOX c OK List completed (0.001 + 0.000 secs). **[5] To close the connection session and issue a graceful exit or logout:** * **type:** e logout you shall see responses: * BYE Logging out e OK Logout completed (0.001 + 0.000 secs). Connection closed by foreign host. [END]