Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ability to set imap_idle_notify_interval at setup time #129

Closed
llchen223 opened this issue Aug 6, 2014 · 8 comments
Closed

ability to set imap_idle_notify_interval at setup time #129

llchen223 opened this issue Aug 6, 2014 · 8 comments

Comments

@llchen223
Copy link

llchen223 commented Aug 6, 2014

It would be nice to be able to set imap_idle_notify_interval to something reasonable at setup time.

@JoshData
Copy link
Member

JoshData commented Aug 6, 2014

Can you elaborate about what makes the default not reasonable?

# How long to wait between "OK Still here" notifications when client is
# IDLEing.
#imap_idle_notify_interval = 2 mins

(As far as I know, this setting does not affect new mail notifications.)

@jkaberg
Copy link
Contributor

jkaberg commented Aug 7, 2014

@JoshData
Copy link
Member

JoshData commented Aug 7, 2014

Have you actually observed a battery problem? I ask because on my phone I have K-9 set up with three separate IMAP accounts (all to my Mail-in-a-Box) and my battery life has been great. I sort of wonder if those IDLE refreshes are actually occurring every two minutes at all?

@llchen223
Copy link
Author

llchen223 commented Aug 7, 2014

Yes, imap_idle_notify_interval does work under Dovecot.

To debug:
openssl s_client -connect :993
a login
a IDLE

You should see output (here I set imap_idle_notify_interval = 1 mins):

  • idling
  • OK Still here
  • OK Still here
  • OK Still here

Default is 2 mins:
src/imap/imap-settings.c
66: DEF(SET_TIME, imap_idle_notify_interval),
87: .imap_idle_notify_interval = 2*60,

I'm not sure if IMAP IDLE works under K-9.

On Thu, Aug 7, 2014 at 6:41 AM, Joshua Tauberer notifications@github.com
wrote:

Have you actually observed a battery problem? I ask because on my phone I
have K-9 set up with three separate IMAP accounts (all to my Mail-in-a-Box)
and my battery life has been great. I sort of wonder if those IDLE
refreshes are actually occurring every two minutes at all?


Reply to this email directly or view it on GitHub
#129 (comment).

@JoshData
Copy link
Member

JoshData commented Aug 7, 2014

Well that's what I mean. I don't know if mobile devices actually have this problem anymore. Would be cool if we could measure the traffic before making the change to the config. Would you be up for trying, using e.g. tcpdump to record all of the traffic? Might require having a dedicated box so that IMAP traffic on a real account that's transferring email doesn't get in the way.

@JoshData
Copy link
Member

JoshData commented Aug 9, 2014

I looked into this carefully. The interval of 2min does result in messages being sent on that interval.

Details here:
http://razor.occams.info/blog/2014/08/09/how-bad-is-imap-idle/

I'll try a longer interval for my own mail for a while to see if I notice any issues.

While looking I also saw that K-9 separately polls every 90 seconds if the Drafts folder doesn't exist --- until it's created. So I'll be revising Mail-in-a-Box to create that folder when new accounts are created.

@llchen223
Copy link
Author

llchen223 commented Aug 10, 2014

I installed k9 on a Nexus 5 phone. There was negligible impact on battery (measured by gsam app) with Dovecot at default IDLE (2 min) -- tcpdump did show IDLE traffic at 2 min intervals.

On August 9, 2014 9:53:28 AM PDT, Joshua Tauberer notifications@github.com wrote:

I looked into this carefully. The interval of 2min does result in
messages being sent on that interval.

Details here:
http://razor.occams.info/blog/2014/08/09/how-bad-is-imap-idle/

I'll try a longer interval for my own mail for a while to see if I
notice any issues.

While looking I also saw that K-9 separately polls every 90 seconds if
the Drafts folder doesn't exist --- until it's created. So I'll be
revising Mail-in-a-Box to create that folder when new accounts are
created.


Reply to this email directly or view it on GitHub:
#129 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@JoshData
Copy link
Member

JoshData commented Aug 10, 2014

Thanks for looking into this! I updated the blog post with your note.

Since we don't have evidence there's a real problem, I'll change the interval from 2 minutes to 4 minutes for good measure, staying below the point where I think maybe there might be timeouts somewhere between the ends of the connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants