Thunderbird does Push Mail
Written by Freddie Fedora   
Wednesday, 13 May 2009 21:34

Thunderbird logoUnbelievably, I still get to learn new things every day.  Today, I discovered that my favorite desktop mail client --- Thunderbird --- does IMAP IDLE. Email flashes on screen the instant it's received on the IMAP server, and no wasted cycles polling the server endlessly.

This is pretty humbling considering that we've been using Thunderbird as our e-mail client of choice in the office for a while, and the IMAP protocol for over 10 years to fetch and manage our mail. We also have all our iPhones, E71s, Blackberries et al. doing IMAP (only the Nokia E Series and the G1 do IMAP IDLE correctly, AFAIK - Winmo - I'm not so sure. Apple tries to lock you into using MobileME by breaking IMAP IDLE altogether. Typical. 

 

What is IDLE and why should you use it?

RFC 2177 defines IDLE, an extension to the IMAP protocol allowing mail clients to change into an idle mode while keeping the TCP-connection open. This allows the servers to notify the clients of new mails on arrival (the so-called push e-mail).

This works for most (but not all) IMAP servers in the wild. Not all e-mail providers support IMAP IDLE, though – you should check whether your mail provider supports it by opening a telnet connection to the IMAP server (standard port for IMAP is 143) and sending 001 capability. If the answer contains „IDLE” your server supports IMAP IDLE.


All the mail servers provided by the fine folks at Lightspeed (who provide our hosting) for example answer (see blue text below)

 

* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS AUTH=PLAIN SASL-IR] telecare.picomail.net Cyrus IMAP v2.3.13-Fedora-RPM-2.3.13-3.fc10 server ready

001 CAPABILITY

* CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS AUTH=PLAIN SASL-IR ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE CONDSTORE SCAN IDLE LISTEXT LIST-SUBSCRIBED X-NETSCAPE URLAUTH

 

There's one thing to look out for, though – Thunderbird only sends the IDLE command (effectively enabling push e-mail) if you disable the „check for new mail every nth minute”-option.

I could not find any documentation on that feature – however, which is too bad.  More people should know about this. Also, the default settings are once every 10 minutes, and don't check on startup.

Steve Jobs would say: "Blackberry for the rest of us” – using purely OpenSource - IMAP and Thunderbird.  No wonder Blackberry has tried to dodge the IMAP question just about forever - there's no reason for them to exist as
a service provider (although they make some rather fine handsets, the email service is pedestrian at best). Arguably the "check email every x minutes" flag should be taken out of thunderbird altogether if the server is detected to support IDLE, but that's another article in the making.

Now to figure out which mobile mail client (other than the tried and tested Nokia E Series) does IMAP IDLE properly.