IMAP IDLE

Armijn Hemel, February 4, 2010, 9726 views.

IMAP IDLE is a great addition to the IMAP protocol: whenever new mail arrives the server notifies the client and the client does not have to keep polling the server all the time.

Tags: , ,

On our IMAP server (we use Dovecot) we regularly saw a lot of IMAP processes for which there were no active connections anymore. Using strace we quickly found out what was happening: the IMAP server was still sending out notifications to the process that new mail had arrived, even though the original process was not there at all anymore.

A bit of research got us onto the trail of IMAP IDLE, a bit of functionality implemented in several IMAP clients that makes the IMAP server notify a client immediately when there is new mail. Not many people know what it is and instruct their mail client to fetch mail every few minutes. This is completely unnecessary and just takes resources. Many of the hanging IMAP processes can be attributed to having both IMAP IDLE and fetching every few minutes enabled.

Thunderbird

Thunderbird works really good with IDLE and it seems to be enabled by default, also when you instruct your mail program to fetch mail every few minutes. To find the IMAP IDLE settings, go to the advanced settings in the IMAP account settings. The option " use IDLE command if the server supports it" should be set. In the account settings the option "check for new messages" should be disabled.

Mail.App

Like Thunderbird Apple's Mail.App also has excellent support for IMAP IDLE. One customer reported some issues with hanging mail, but that turned out to be his desktop that had simply gone a bit crazy.

Evolution

For reasons unknown to me the GNOME developers have never bothered to implement support for IMAP IDLE. It has been on their schedule since development of 2.24 started (and requests for support were made before that), but in 2.29.6 this functionality has unfortunately still not been added.

Other clients

There are many other clients that support IMAP IDLE. The Wikipedia webpage on IMAP IDLE lists a few.

The effects of telling our customers to use IMAP IDLE was immediately visible. There are about 50% less lingering IMAP processes than we used to have and there have been no complaints at all. In fact, some customers noticed that they were getting their mail faster.

Social networking: Tweet this article on Twitter Pass on this article on LinkedIn Bookmark this article on Google Bookmark this article on Yahoo! Bookmark this article on Technorati Bookmark this article on Delicious Share this article on Facebook Digg this article on Digg Submit this article to Reddit Thumb this article up at StumbleUpon Submit this article to Furl

Talkback

respond to this article