Тестируем IMAP через telnet
В категорії Підказки от 23 Лютого, 2013. Автор adminЗаходим на сервер
telnet xx.xx.xx.xx imap
a1 LOGIN mylogin mypassword
В случае удачи ответ такой :
a1 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 CONDSTOREQRESYNC ESEARCH ESORT SEARCHRES
WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
В случае неудачи :
LOGIN BAD Error in IMAP command received by server.
Далее смотрим список ящиков :
a2 LIST “” “*”
Далее можем просмотреть список входящих писем и увидеть непрочитанные
a3 EXAMINE INBOX
В начале каждой команды в обязательном порядке выставлять «a» с инкрементом.
Вот так выглядит успешный коннект и обмен информацией :
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
LOGIN xx@xx.ru zzzzzz
LOGIN BAD Error in IMAP command received by server.
a1
a1 BAD Error in IMAP command received by server.
a1 LOGIN xx@xx.ru zzzzzz
a1 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
a2 LIST “” “*”
* LIST (\HasChildren) “.” “INBOX”
* LIST (\HasNoChildren) “.” “INBOX.Trash”
* LIST (\HasNoChildren) “.” “INBOX.Drafts”
* LIST (\HasNoChildren) “.” “INBOX.Sent”
a2 OK List completed.
a3 EXAMINE INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS ()] Read-only mailbox.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1360164233] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
* OK [HIGHESTMODSEQ 1] Highest
a3 OK [READ-ONLY] Select completed.
a4 LIST “” “*”
* LIST (\HasChildren) “.” “INBOX”
* LIST (\HasNoChildren) “.” “INBOX.Trash”
* LIST (\HasNoChildren) “.” “INBOX.Drafts”
* LIST (\HasNoChildren) “.” “INBOX.Sent”
a4 OK List completed.
LOGIN xx@xx.ru zzzzzz
LOGIN BAD Error in IMAP command received by server.
a1
a1 BAD Error in IMAP command received by server.
a1 LOGIN xx@xx.ru zzzzzz
a1 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
a2 LIST “” “*”
* LIST (\HasChildren) “.” “INBOX”
* LIST (\HasNoChildren) “.” “INBOX.Trash”
* LIST (\HasNoChildren) “.” “INBOX.Drafts”
* LIST (\HasNoChildren) “.” “INBOX.Sent”
a2 OK List completed.
a3 EXAMINE INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS ()] Read-only mailbox.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1360164233] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
* OK [HIGHESTMODSEQ 1] Highest
a3 OK [READ-ONLY] Select completed.
a4 LIST “” “*”
* LIST (\HasChildren) “.” “INBOX”
* LIST (\HasNoChildren) “.” “INBOX.Trash”
* LIST (\HasNoChildren) “.” “INBOX.Drafts”
* LIST (\HasNoChildren) “.” “INBOX.Sent”
a4 OK List completed.