Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Searchable, convenient, complete TCP/IP information.
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  TCP/IP Key Applications and Application Protocols
           9  TCP/IP File and Message Transfer Applications and Protocols (FTP, TFTP, Electronic Mail, USENET, HTTP/WWW, Gopher)
                9  TCP/IP Electronic Mail System: Concepts and Protocols (RFC 822, MIME, SMTP, POP3, IMAP)
                     9  TCP/IP Electronic Mail Access and Retrieval Protocols and Methods
                          9  TCP/IP Internet Message Access Protocol (IMAP/IMAP4)

Previous Topic/Section
IMAP Authenticated State: Mailbox Manipulation/Selection Process and Commands
Previous Page
Pages in Current Topic/Section
12
3
Next Page
Other TCP/IP Electronic Mail Access and Retrieval Methods
Next Topic/Section

IMAP Selected State: Message Manipulation Process and Commands
(Page 3 of 3)

The FETCH and STORE Commands

This command list might seem surprisingly short; you might wonder, for example, where the specific commands are to read a message header or body, delete a message, mark a message as “seen” and so forth. The answer is that these (and much more) are all implemented as part of the powerful and flexible FETCH and STORE commands.

The FETCH command can be used to read a number of specific elements from either one message or a sequence of messages. The list of “message data items” specifies what information is to be read. The data items that can be read include the headers of the message, the message body, flags that are set for the message, the date of the message and much more. The FETCH command can even be used to retrieve part of a message, such as one body part of a MIME multipart message, making it very useful indeed. Special “macros” are also defined for convenience. For example, the client can specify the message data item “FULL” to get all the data associated with a message.

The compliment to FETCH, STORE, is used to make changes to a message. However, this command is not used to modify the basic message information such as the content of headers and the message body. Rather, it exists for changing the message's status flags. For example, after replying to a particular message, the client may set the “\Answered” flag for that message using the STORE command.

Message deletion in IMAP is done in two stages for safety, as in POP and many other protocols. The client sets the “\Deleted” flag for whichever messages are to be removed, using the STORE command. The messages are only really deleted when the mailbox is expunged, typically when it is closed.

The search facility in IMAP4 is also surprisingly quite sophisticated, allowing the client to look for messages based on multiple criteria simultaneously. For example, with the appropriate syntax, you could search for “all posts that are flagged as having been answered, that were sent by Jane Jones before April 1, 2004”. Users of IMAP clients can thus easily locate specific messages even in very large mailboxes, without having to download hundreds of messages to hunt through.

Key Concept: After the client opens a specific mailbox, the IMAP session enters the Selected state, where operations such as reading and copying individual e-mail messages may be performed. The two most important commands used in this state are FETCH, which can be used to retrieve a whole message, part of a message, or only certain message headers or flags; and STORE, which sets a message’s status information. IMAP also includes a powerful search facility, providing users with great flexibility in finding messages in a mailbox. When the client is done working with a particular mailbox, it may choose a different one and re-enter the Selected state, close the mailbox and return to the Authenticated state, or log out, automatically entering the Logout state.


 


Previous Topic/Section
IMAP Authenticated State: Mailbox Manipulation/Selection Process and Commands
Previous Page
Pages in Current Topic/Section
12
3
Next Page
Other TCP/IP Electronic Mail Access and Retrieval Methods
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.