IMAP IDLE Friendlier to Cell Phone Batteries

New ideas and constructive comments go here.

Moderator: Moderators

Post Reply
Posts: 1
Joined: Wed Jan 01, 2014 12:05 pm

IMAP IDLE Friendlier to Cell Phone Batteries

Post by migle »


I was going to post this on the thread "Push Email Support for Cell Phones" but it's closed.
I hope this is not a repeated issue.

When idling, the IMAP server usually sends a sort of keep-alive message periodically. On Dovecot, it is "* OK still here", on Cyrus, IIRC it is just "*". Dovecot sends it according to the imap_idle_notify_interval, which is 2 minutes by default.

Now, on my android phone I use k9-mail and have been using "Push Email" for three different servers: one is mine, at home, another is yours,, and another one for my job. All three run dovecot.

Reading the link below I learned that the cell phone radio stays on at full power 17 seconds after the last packet. If I'm unlucky, with 3 different IMAP servers, that could mean half of the time.

It is interesting to note that that is more communication than what is required for instant messaging. XMPP ping is only an extension to the protocol. My ejabberd server only responds to pings and my cell phone client sends every 10 minutes. Of course, one expects IM to be more responsive than email. Also relevant here, the usual interval for TCP automatic keepalives is 2 hours.

Well, for my server I changed to 30 minutes. An IMAP server can shut down a connection after 29 minutes of inactivity, so k9-mail restarts the IDLE command after 24 minutes, the "OK still here" message does not stop this from happening, so...

For IMAP IDLE to be nicer to cell phones, this interval must be increased. Of course, cell phones are not the only users of IMAP, and if the dovecot people have that at 2 minutes, they may have good reasons....

Ref: ... tery-life/
Post Reply