Jump to Navigation

259 - Connect IMAP server with no SSL(143)

If you want to connect IMAP with telnet & command line, you should do the following steps.

The "tag1" etc at the begining of each command is just a tag you make up.
Supposedly it should be unique for each line; I've found you can actually use the same tag over and over again.

# telnet imap.myserver.com 143

Trying 206.132.166.xxx...
Connected to 206.132.166.xxx (206.132.166.xxx).
Escape character is '^]'.
* OK mail.myserver.com IMAP4rev1 v12.264 server ready

tag1 login user01 password
tag1 OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ID IDLE LIST-EXTENDED LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES UIDPLUS UNSELECT WITHIN] LOGIN completed

tag2 select INBOX
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1] UIDs are valid for this mailbox
* OK [UIDNEXT 1401] next expected UID is 1401
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk)
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded \*)] junk-related flags are not permanent
* OK [HIGHESTMODSEQ 5819] modseq tracked on this mailbox
tag2 OK [READ-WRITE] SELECT completed

tag3 fetch 2 body[text]
* 2 FETCH (BODY[TEXT] {25}

This is a test e-mail.

)
* 2 FETCH (FLAGS (\Recent \Seen))
tag3 OK FETCH completed
tag4 close
tag4 OK CLOSE completed

tag5 logout
* BYE mail.myserver.com IMAP4rev1 server terminating connection
tag5 OK LOGOUT completed
Connection closed by foreign host.

 

 

 

Linux:


Main menu 2

Story | by Dr. Radut