Robert Goldsmith
2009-Apr-05 00:41 UTC
[Dovecot] Feature Request: Control over IMP IDLE 'OK Still Here' message timings
Hi all, I would like to make a feature request regarding IMAP Idle support. Currently when a client triggers Idle support, Dovecot then sends 'OK Still Here' messages every 2 minutes. This is apparently to prevent NAT systems killing the tcp connection and disconnecting the client. However, while this may be fine for desktop clients, this rapidly drains the battery life of mobile clients such as phones. Unfortunately, the timing control on this behaviour is a c define at the top of cmd-idle.c and is only adjustable at compile-time. I have experimented with this define and find a timeout of 20 minutes between 'OK' messages is perfectly adequate for my system setup and results in a significant battery saving for my Nokia 6120c (increasing from ~ 6 hours to ~ 55 hours from full charge to low battery warning). Therefore, can you please make the timeout changeable from the config file, even if it defaults to the current 2min timing, so admins supporting mobile users can balance battery life with a need to prevent killed tcp connections. Thanks Robert Goldsmith --- GnuPG public key: http://www.Far-Blue.co.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090405/432ed9d1/attachment-0002.bin>
Timo Sirainen
2009-Apr-16 23:17 UTC
[Dovecot] Feature Request: Control over IMP IDLE 'OK Still Here' message timings
On Sun, 2009-04-05 at 01:41 +0100, Robert Goldsmith wrote:> I would like to make a feature request regarding IMAP Idle support. > > Currently when a client triggers Idle support, Dovecot then sends 'OK > Still Here' messages every 2 minutes. This is apparently to prevent > NAT systems killing the tcp connection and disconnecting the client. > However, while this may be fine for desktop clients, this rapidly > drains the battery life of mobile clients such as phones. > Unfortunately, the timing control on this behaviour is a c define at > the top of cmd-idle.c and is only adjustable at compile-time. I have > experimented with this define and find a timeout of 20 minutes between > 'OK' messages is perfectly adequate for my system setup and results in > a significant battery saving for my Nokia 6120c (increasing from ~ 6 > hours to ~ 55 hours from full charge to low battery warning).I had originally hoped not to have this setting, since there's really no good global value for it. Some people want to use mobile clients, others are behind NAT. Perhaps a single user has both, in which case all the values would be bad. So it would be nice if Dovecot was able to figure out automatically what the value should be, maybe based on IP address or something. But that's too much work, so I just went and finally added the setting to v1.2: http://hg.dovecot.org/dovecot-1.2/rev/8de5b2a19a08 At least it's possible to make it a per-user setting (by returning from userdb). And perhaps if you really wanted to you could have the userdb do some kind of a IP lookup where it figures out if the source IP is mobile or not and return the value based on that. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090416/6d6cde86/attachment-0002.bin>
Stian Jordet
2009-Apr-18 12:32 UTC
[Dovecot] Feature Request: Control over IMP IDLE 'OK Still Here' message timings
Robert Goldsmith skrev: [...]> Therefore, can you please make the timeout changeable from the config > file, even if it defaults to the current 2min timing, so admins > supporting mobile users can balance battery life with a need to > prevent killed tcp connections.I'm amazed how you figured this out. I just thought my phone used more battery when connected to IMAP, I never thought it had anything to do with the "OK Still Here" messages (altough I knew they existed). Thanks for letting us all know, and thanks to Timo for accepting Robert's patch! Regards, Stian