User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

Sometimes for odd reasons you will need to connect directly to IMAP protocol and do tests using the telnet tool. Here it is a little example on how I did it:

# telnet localhost imap
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ STARTTLS AUTH=PLAIN] IMAP gateway ready

a1 LOGIN info 123
a1 OK [CAPABILITY IMAP4rev1 LITERAL+ CHILDREN XAOL-OPTION NAMESPACE QUOTA IDLE] LOGIN completed
a2 LIST "" "*"
* LIST (\HasChildren) "/" "Public folders"
* LIST (\HasNoChildren) "/" "INBOX"
* LIST (\HasNoChildren) "/" "Outbox"
* LIST (\HasNoChildren) "/" "Deleted Items"
* LIST (\HasNoChildren) "/" "Sent Items"
* LIST (\HasNoChildren) "/" "Drafts"
* LIST (\HasNoChildren) "/" "Junk E-mail"
* LIST (\HasNoChildren) "/" "Trash"
a2 OK LIST completed

a3 EXAMINE INBOX
* 840 EXISTS
* 777 RECENT
* FLAGS (\Seen \Draft \Deleted \Flagged \Answered $Forwarded)
* OK [PERMANENTFLAGS (\Seen \Draft \Deleted \Flagged \Answered $Forwarded)] Permanent flags
* OK [UIDNEXT 7368] Predicted next UID
* OK [UNSEEN 829] First unseen message
* OK [UIDVALIDITY 17] UIDVALIDITY value
a3 OK [READ-ONLY] EXAMINE completed

a4 FETCH 1 BODY[]
* 1 FETCH (BODY[] {16382}
<MAIL BODY>
FLAGS (\Seen))
a4 OK FETCH completed

a5 LOGOUT
* BYE server logging out
a5 OK LOGOUT completed
Connection closed by foreign host.

blog comments powered by Disqus

About

Read about IT, Migration, Business, Money, Marketing and other subjects.

Some subjects: FusionPBX, FreeSWITCH, Linux, Security, Canada, Cryptocurrency, Trading.