Setting up my iPhone and various other clients to access my email via IMAP (Internet Message Access Protocol) I’d been reading about how Google finally supported the “IDLE” command and how this made “push” work a lot better. I finally got around to looking up some details. In a nutshell, the client keeps the TCP connection open; sends the “IDLE” command; and eventually the server responds when there’s a message.
From IMAP IDLE: The best approach for ‘push’ email:

How IDLE Works
IMAP works by the software on the mobile device (the client) issuing commands to the server. An IMAP server provides two things in response to a client command:

  1. An answer to the request.
  2. Information on any new messages.

This means that where a client is actively doing things with an IMAP server, it will > be told immediately about new messages. The client can then get summary information on the message to present to the user, and can (automatically) download the message when appropriate.
This means that an active client will always be kept up to date. The IDLE command deals with the situation where the client has no more requests to make. The server responds to the idle command when there is a new message (or messages) which indicates to the client that there are new messages.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.