IMAP — an example
What you type is in bold type. You can get an IMAP connection by telnetting to port 143. You can get an SSL IMAP connection by doing this:
openssl s_client -host <host/ip> -port 993 -crlf
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE] Courier-IMAP ready. Copyright 1998-2003 Double Precision, Inc. See COPYING for distribution information.
? LOGIN myaccount mypassword
? OK LOGIN Ok.
? LIST "" "*"
* LIST (\HasNoChildren) "." "INBOX.foo"
* LIST (\HasNoChildren) "." "INBOX.bar"
* LIST (\HasNoChildren) "." "INBOX.baz.quux"
* LIST (\HasNoChildren) "." "INBOX.frank.fred"
* LIST (\HasChildren) "." "INBOX.baz"
* LIST (\Unmarked \HasChildren) "." "INBOX"
* LIST (\Noselect \HasChildren) "." "INBOX.frank"
? OK LIST completed.
? Select INBOX.foo
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen)] Limited
* 7 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1063918011] Ok
* OK [READ-WRITE] Ok
? FETCH 1 Body
* 1 FETCH (BODY ("text" "plain" NIL NIL NIL "8bit" 1782 37))
? OK FETCH completed.
? FETCH 1 BODY[]
* 1 FETCH (BODY[] {3259}
this is the full text of the message
just pretend it's 3259 bytes long
)
? OK FETCH completed.
? LOGOUT
* BYE Courier-IMAP server shutting down
? OK LOGOUT completed
Easy.
|