Skip to main content

6.3.13 IDLE Command

Arguments: none

Responses: continuation data will be requested; client sends "DONE" to end

Result:

  • OK - IDLE completed after client sent "DONE"
  • NO - failure: server will not allow IDLE at this time
  • BAD - command unknown or arguments invalid

The IDLE command allows a client to tell the server that it's ready to accept real-time updates. Without IDLE, a client would need to poll the server for changes.

The server is free to send untagged EXISTS, EXPUNGE, FETCH, and other responses at any time while IDLE is active.

The IDLE command is terminated by the client sending "DONE".

Clients using IDLE are advised to terminate IDLE and reissue it at least every 29 minutes to avoid being logged off.

Example:

C: A002 IDLE
S: + idling
...time passes; new mail arrives...
S: * 4 EXISTS
C: DONE
S: A002 OK IDLE terminated