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

Use IMAP's IDLE (a.k.a. "push") to automatically update folders with new incoming emails instead of a polling static refresh timer #118

Open
nekohayo opened this issue Nov 17, 2024 · 1 comment

Comments

@nekohayo
Copy link

nekohayo commented Nov 17, 2024

By default, usermin 2.102's webmail interface does not show new mails as they arrive, you have to manually click the Refresh button.

You can configure (on a per-user basis) an optional automatic refresh delay for it, but that seems like the wrong solution in this day and age:

  • You shouldn't have to have to configure this (for each user!) in the first place
  • Most users won't ever think of this, and will just think their webmail is broken (or miss important emails throughout the day)
  • It is inefficient and disruptive, because you may be reloading the web interface even when there are no new emails, which wastes CPU / power and bandwidth (which can be a problem if you're on a high-latency or roaming mobile connection)

It would make much more sense to just use IMAP's IDLE feature (a.k.a. standard "push") to be notified by the server when new messages come into the various folders (particularly the inbox, but also the "currently displayed folder" or "currently displayed search results" if possible), so that it can update the messages list view and the sidebar's unread counts.

For a full explanation, see also this great article: https://www.imageway.com/2018/email-hosting-blog/imap-idle-the-best-approach-for-push-email ; that article also explains that you need to have a small keepalive every 15-30 minutes (when the web client is active on the user's computer) to maintain the IDLE connection:

Data usage for IMAP IDLE is essentially the 15 minute NOOP to keep the connection alive, plus a small amount of data to do the notification.

@jcameron
Copy link
Collaborator

That's an excellent idea! We probably don't have time to implement it right now, but I'll keep in mind for the future..

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

2 participants