Difference between revisions of "IMAP test"
From Noah.org
Jump to navigationJump to search(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Engineering]] | [[Category:Engineering]] | ||
[[Category:Mail]] | [[Category:Mail]] | ||
− | |||
− | |||
This shows how to do basic sanity test of an IMAP server. See also [[POP3_test]] and [[SMTP_test]]. | This shows how to do basic sanity test of an IMAP server. See also [[POP3_test]] and [[SMTP_test]]. | ||
The numbers that precede each IMAP command may be any unique string. It should be unique per connection, so using incrementing integers seems as good as anything. | The numbers that precede each IMAP command may be any unique string. It should be unique per connection, so using incrementing integers seems as good as anything. | ||
− | MESSAGES may be one of MESSAGES, UNSEEN, RECENT UIDNEXT UIDVALIDITY | + | Below in command 4, '''MESSAGES''' may be one of MESSAGES, UNSEEN, RECENT UIDNEXT UIDVALIDITY |
<pre> | <pre> | ||
Line 19: | Line 17: | ||
</pre> | </pre> | ||
− | All IMAP headers in message #1 | + | === Other IMAP command examples === |
− | + | ||
− | headers and body in message #1 | + | ;All IMAP headers in message #1: 5 FETCH 1 ALL |
− | + | ;headers and body in message #1: 6 FETCH 1 FULL | |
− | body only in message #1 | + | ;body only in message #1: 7 FETCH 1 BODY |
− | + | ;envelope only in message #1: 8 FETCH 1 ENVELOPE | |
− | envelope only in message #1 | + | ;Get full email in all(*) messages: 9 FETCH * FULL |
− | + | ;Get full message #1: 10 UID fetch 1:1 (UID RFC822.SIZE FLAGS BODY.PEEK[]) | |
− | Get full email in all(*) messages | + | ;Get flags of message #1: 11 FETCH 1 FLAGS |
− | + | ;Mark message #1 as read. This adds \Seen to existing flags: 12 STORE 1 +FLAGS \Seen | |
− | Get full message #1 | ||
− |
Latest revision as of 21:14, 24 November 2008
This shows how to do basic sanity test of an IMAP server. See also POP3_test and SMTP_test.
The numbers that precede each IMAP command may be any unique string. It should be unique per connection, so using incrementing integers seems as good as anything.
Below in command 4, MESSAGES may be one of MESSAGES, UNSEEN, RECENT UIDNEXT UIDVALIDITY
telnet imap.example.com 143 1 LOGIN username password 2 LIST "" * 3 SELECT Inbox 4 STATUS Inbox (MESSAGES) 5 CLOSE 6 LOGOUT
Other IMAP command examples
- All IMAP headers in message #1
- 5 FETCH 1 ALL
- headers and body in message #1
- 6 FETCH 1 FULL
- body only in message #1
- 7 FETCH 1 BODY
- envelope only in message #1
- 8 FETCH 1 ENVELOPE
- Get full email in all(*) messages
- 9 FETCH * FULL
- Get full message #1
- 10 UID fetch 1:1 (UID RFC822.SIZE FLAGS BODY.PEEK[])
- Get flags of message #1
- 11 FETCH 1 FLAGS
- Mark message #1 as read. This adds \Seen to existing flags
- 12 STORE 1 +FLAGS \Seen