From b84f0f95db6b12d187d4670cfed60aed2cbb89fb Mon Sep 17 00:00:00 2001 From: levin Date: Sat, 6 Oct 2018 11:00:15 +0200 Subject: [PATCH] Added doc about imap idle interval --- docs/u_e-dovecot-idle_interval.md | 35 +++++++++++++++++++++++++++++++ mkdocs.yml | 3 ++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 docs/u_e-dovecot-idle_interval.md diff --git a/docs/u_e-dovecot-idle_interval.md b/docs/u_e-dovecot-idle_interval.md new file mode 100644 index 000000000..ab107bd8a --- /dev/null +++ b/docs/u_e-dovecot-idle_interval.md @@ -0,0 +1,35 @@ +# Changing the IMAP IDLE interval +## What is the IDLE interval? +Per default, dovecot sends a "I'm still here" notification to every client that has an open connection with dovecot to get mails as quickly as possible without manually polling it (IMAP PUSH). This notification is controlled by the setting [`imap_idle_notify_interval`](https://wiki.dovecot.org/Timeouts), whose default value is 2 minutes. + +The short interval results in the client getting a lot of messages for this connection, which is bad for mobile devices because every time the device receives this message, the mailing app has to wake up and look at it, only to see that it has nothing to do. This can result in unnecessary battery drain. + +## Edit the value +### Change configuration +Create a new file `data/conf/dovecot/extra.conf` (or edit it if it already exists). +Insert the setting followed by the new value. For example, to set the interval to 29 minutes you could type: + +``` +imap_idle_notify_interval = 29 mins +``` + +I choose 29 minutes because this is the maximum value allowed by the [corresponding RFC](https://tools.ietf.org/html/rfc2177). + +!!! warning + This isn't a default setting in mailcow because we don't know how this setting changes the behavior of other clients. Be careful if you change this and monitor different behavior. + +### Reload dovecot +Now reload dovecot: +``` +docker-compose exec dovecot-mailcow dovecot reload +``` + +!!! info + You can check the value of this setting with + ``` + docker-compose exec dovecot-mailcow dovecot -a | grep "imap_idle_notify_interval" + ``` + If you didn't change it, it should be at 2m. If you did change it, you should see your new value. + + + diff --git a/mkdocs.yml b/mkdocs.yml index 64e4efc96..93efff466 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -70,7 +70,8 @@ nav: - "(Re-)Enable any and all authenticated ACL settings": 'u_e-dovecot-any_acl.md' - "Expunge a User's Mails": 'u_e-dovecot-expunge.md' - 'More Examples with DOVEADM': 'u_e-dovecot-more.md' - - 'Move vmail volume': 'u_e-dovecot-vmail-volume.md' + - 'Move vmail volume': 'u_e-dovecot-vmail-volume.md' + - 'IMAP IDLE interval': 'u_e-dovecot-idle_interval.md' - 'Nginx': 'u_e-nginx.md' - 'Redis': 'u_e-redis.md' - 'Rspamd': 'u_e-rspamd.md'