Dovecot – Proper IDLE timeout for android phones

If you are using your own imap server with android you could (but not nesesery) notice bigger battery drain and email application being on top of application that drain battery.

This could be a server side problem, because default dovecot configuration have idle_timeout set to 2minuts, so basicly every 2 minuts your phone query/poll imap server information about new emails – which results in higher battery drain.

Lets evalueate this with simple shell command:

openssl s_client -connect mail.server.address:993
a login <USER> <PASSWORD>
a IDLE

This should result i:

+ idling
* OK Still here

The interval between each ‘OK still here’ is that your imap clean see/does. By default this should be 2minut interval.

Let us change this:

vim /etc/dovecot/conf.d/20-imap.conf
imap_idle_notify_interval= 29 mins

systemctl restart dovecot.service

And we are done.

Leave a Reply

Your email address will not be published. Required fields are marked *

*