RFC 3691 (rfc3691) - Page 2 of 5


Internet Message Access Protocol (IMAP) UNSELECT command



Alternative Format: Original Text Document



RFC 3691                 IMAP UNSELECT command             February 2004


1.  Introduction

   Certain types of IMAP clients need to release resources associated
   with the selected mailbox without selecting a different mailbox.
   While [IMAP4] provides this functionality (via a SELECT command with
   a nonexistent mailbox name or reselecting the same mailbox with
   EXAMINE command), a more clean solution is desirable.

   [IMAP4] defines the CLOSE command that closes the selected mailbox as
   well as permanently removes all messages with the \Deleted flag set.

   However [IMAP4] lacks a command that simply closes the mailbox
   without expunging it.  This document defines the UNSELECT command for
   this purpose.

   A server which supports this extension indicates this with a
   capability name of "UNSELECT".

   "C:" and "S:" in examples show lines sent by the client and server
   respectively.

   The keywords "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" in
   this document when typed in uppercase are to be interpreted as
   defined in "Key words for use in RFCs to Indicate Requirement Levels"
   [KEYWORDS].

2.  UNSELECT Command

   Arguments:  none

   Responses:  no specific responses for this command

   Result:     OK - unselect completed, now in authenticated state
               BAD - no mailbox selected, or argument supplied but
                     none permitted

      The UNSELECT command frees server's resources associated with the
      selected mailbox and returns the server to the authenticated
      state.  This command performs the same actions as CLOSE, except
      that no messages are permanently removed from the currently
      selected mailbox.

   Example:    C: A341 UNSELECT
               S: A341 OK Unselect completed







Melnikov                    Standards Track