rfc-2177

IMAP4 IDLE command

B. Leiba
date1997-06 streamLegacy statusPROPOSED STANDARD pages4 canonicalhttps://www.rfc-editor.org/rfc/rfc2177 doi10.17487/RFC2177
This document specifies the syntax of an IDLE command, which will allow a client to tell the server that it's ready to accept such real-time updates. [STANDARDS-TRACK]

Extracted elements (12)

design-rationale §1

IMAP4 requires clients to poll for changes; while the spec permits servers to push EXISTS responses asynchronously, clients cannot rely on this behavior. IDLE was introduced to allow the server to transmit updates in real time, benefiting users who want immediate new-mail notification and applications that would otherwise need to poll every few seconds.

email

interoperability-note §3

Clients using IDLE are advised to terminate the IDLE and re-issue it at least every 29 minutes to avoid being logged off by servers with inactivity timeouts. This still allows immediate mailbox updates while polling at roughly half-hour intervals.

email

interoperability-note §3

The IDLE command may only be used with IMAP4 server implementations that return 'IDLE' as one of the supported capabilities to the CAPABILITY command; capability advertisement is the gating mechanism for this extension.

email

normative-requirement §3 MUST

After receiving the client's 'DONE' continuation, the server MAY send any remaining queued untagged responses and then MUST immediately send the tagged response to the IDLE command and prepare to process other commands.

email

normative-requirement §3 MUST NOT

If the server does not advertise the IDLE capability in response to the CAPABILITY command, the client MUST NOT use the IDLE command and must poll for mailbox updates instead.

email

normative-requirement §3 MUST

The client MUST continue to be able to accept unsolicited untagged responses to ANY command, as specified in the base IMAP specification, regardless of whether IDLE is in use.

email

normative-requirement §3 MUST NOT

The client MUST NOT send a command while the server is waiting for the DONE continuation, since the server will not be able to distinguish a command from a continuation.

email

normative-requirement §3 MAY

The server MAY consider a client inactive if it has an IDLE command running, and if the server has an inactivity timeout it MAY log the client off implicitly at the end of that timeout period.

email

protocol-element §3

The IDLE command is sent from client to server to signal readiness to accept unsolicited mailbox update messages. The server responds with a continuation ('+') response, and the command remains active until the client sends 'DONE'. While active, the server may send untagged EXISTS, EXPUNGE, and other messages at any time.

email

security-consideration §6

The RFC explicitly states there are no known security issues with the IDLE extension.

email, security

state-machine §3

IDLE transitions: client sends 'IDLE' → server sends '+' continuation (IDLE active state, server may push untagged responses) → client sends 'DONE' → server sends queued untagged responses then tagged OK/NO/BAD → command completes and server accepts new commands.

email

wire-format §4

The formal BNF syntax defines 'idle' as the literal string 'IDLE' followed by CRLF and then 'DONE'. IDLE is added to command_auth, making it valid only in Authenticated or Selected state.

email