rfc-3691

Internet Message Access Protocol (IMAP) UNSELECT command

A. Melnikov
date2004-02 streamIETF wgnon working group statusPROPOSED STANDARD pages5 canonicalhttps://www.rfc-editor.org/rfc/rfc3691 doi10.17487/RFC3691
This document defines an UNSELECT command that can be used to close the current mailbox in an Internet Message Access Protocol - version 4 (IMAP4) session without expunging it. 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. [STANDARDS-TRACK]

Extracted elements (8)

design-rationale §1

IMAP4 lacked a command to close the selected mailbox without expunging it; the existing workarounds (SELECT with a nonexistent mailbox or EXAMINE to reselect) were functional but inelegant. UNSELECT was introduced to provide a clean solution for clients that need to release resources without triggering message deletion.

email

interoperability-note §1

A server that supports this extension MUST advertise the capability name 'UNSELECT' in its CAPABILITY response. Clients should check for this capability before issuing the command.

email

normative-requirement §4 MUST

Implementations MUST accept the UNSELECT command string in a case-insensitive fashion.

email

protocol-element §2

The UNSELECT command frees server resources associated with the selected mailbox and returns the server to the authenticated state. It performs the same actions as CLOSE, except that no messages are permanently removed from the currently selected mailbox. It takes no arguments and produces no specific responses beyond the tagged OK or BAD result.

email

registry §5

This document registers the 'UNSELECT' capability in the IMAP4 capabilities registry maintained by IANA at http://www.iana.org/assignments/imap4-capabilities. IMAP4 capabilities are registered by publishing a standards-track or IESG-approved experimental RFC.

email, registry

security-consideration §3

The UNSELECT extension is believed not to raise any additional security concerns beyond those already discussed in RFC 3501 (IMAP4rev1).

email, security

state-machine §2

Successful execution of UNSELECT transitions the server from the Selected state to the Authenticated state. On failure (no mailbox selected, or an argument is supplied), the server returns BAD and remains in its current state.

email

wire-format §4

The formal ABNF grammar extends the IMAP4 command-select rule as: command-select /= 'UNSELECT'. The command takes no arguments and is case-insensitive.

email