6.0.0-git
2019-03-20

[#12705] Rate limit polling for new mail notifications
Summary Rate limit polling for new mail notifications
Queue IMP
Queue Version Git master
Type Enhancement
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester arjen+horde (at) de-korte (dot) org
Created 2013-09-20 (2007 days ago)
Due
Updated 2013-12-17 (1919 days ago)
Assigned 2013-10-01 (1996 days ago)
Resolved 2013-11-12 (1954 days ago)
Milestone 6.2
Patch No

History
2013-12-17 11:17:27 Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit 7f8674eceac1b8d878857a6cadced4e1882fc0bf
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Tue Nov 12 12:15:51 2013 -0700

     [mms] Add rate limiting to new mail notification alerts to 
prevent flooding of the remote mail server (Request #12705).

  imp/docs/CHANGES                                   |    2 +
  .../Handler/Decorator/NewmailNotify.php            |   30 
++++++++++++++------
  imp/package.xml                                    |    1 +
  3 files changed, 24 insertions(+), 9 deletions(-)

http://git.horde.org/horde-git/-/commit/7f8674eceac1b8d878857a6cadced4e1882fc0bf
2013-11-12 19:19:59 Michael Slusarz Comment #5
State ⇒ Resolved
Reply to this comment
IMP 6.2.


commit 7f8674eceac1b8d878857a6cadced4e1882fc0bf
Author: Michael M Slusarz <slusarz at horde.org>
Date:   Tue Nov 12 12:15:51 2013 -0700

     [mms] Add rate limiting to new mail notification alerts to 
prevent flooding of the remote mail server (Request #12705).

  imp/docs/CHANGES                                         |    2 +
  imp/lib/Notification/Handler/Decorator/NewmailNotify.php |   30 +++++++++----
  imp/package.xml                                          |    1 +
  3 files changed, 24 insertions(+), 9 deletions(-)

http://github.com/horde/horde/commit/7f8674eceac1b8d878857a6cadced4e1882fc0bf
http://git.horde.org/horde-git/-/commit/7f8674eceac1b8d878857a6cadced4e1882fc0bf
2013-10-01 20:08:28 Michael Slusarz Comment #4 Reply to this comment
That shouldn't happen.  For a task such as this in kronolith, we
should really be pooling all of these into a single request.  But
that's a separate enhancement ticket...
Will this be tracked in this ticket or do I need to create an additional one?
#12729
2013-10-01 19:43:10 arjen+horde (at) de-korte (dot) org Comment #3 Reply to this comment
In my IMAP account, I have a fair number of folders that need to be
polled for new messages (about 25) as I use Sieve to sort messages
upon arrival. This means checking for new messages is a relatively
expensive operation.
What does Sieve have to do with this?  Sieve is independent of polling.
I tried to provide some context why I'm polling this many mailboxes. 
Most of my users don't use filters at all, in which case they are only 
subscribed to the INBOX and this doesn't seem to be a problem.

[Show Quoted Text - 14 lines]
Will this be tracked in this ticket or do I need to create an additional one?

[Show Quoted Text - 12 lines]
Suits me fine.
This seems a reasonable feature to put into 6.2.
Great!
2013-10-01 18:51:16 Michael Slusarz Comment #2
Assigned to Michael Slusarz
State ⇒ Assigned
Version ⇒ Git master
Milestone ⇒ 6.2
Reply to this comment
In my IMAP account, I have a fair number of folders that need to be 
polled for new messages (about 25) as I use Sieve to sort messages 
upon arrival. This means checking for new messages is a relatively 
expensive operation.
What does Sieve have to do with this?  Sieve is independent of polling.

[Show Quoted Text - 10 lines]
That shouldn't happen.  For a task such as this in kronolith, we 
should really be pooling all of these into a single request.  But 
that's a separate enhancement ticket...

[Show Quoted Text - 10 lines]
We should probably just use the "refresh" interval that currently exists.

This seems a reasonable feature to put into 6.2.
2013-09-20 09:51:28 arjen+horde (at) de-korte (dot) org Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ Rate limit polling for new mail notifications
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
In my IMAP account, I have a fair number of folders that need to be 
polled for new messages (about 25) as I use Sieve to sort messages 
upon arrival. This means checking for new messages is a relatively 
expensive operation.

When 'Display notification when new mail arrives?' in the Mail 
preferences is selected, it looks like this check is performed for 
each POST request. This means that if multiple POST requests are send 
more or less simultaneously, this check is run many times in parallel. 
For instance, if in a month view of Kronolith I move to the next 
month, 13 POST requests are fired off within a few milliseconds (in my 
agenda there are six calenders, five address books, one tasklist and 
one holidays). Each of these will run

     horde/services/ajax.php/kronolith/listEvents

All in all this takes approximately 10 seconds, during which time the 
check for new messages runs 13 times (pretty much in parallel). If I 
disable the new mail notifications, the same action takes less than 2 
seconds (I made sure these aren't cached results).

It would be nice if there was a preference that would allow to prevent 
polling for new messages if less than 'X' seconds have passed since 
the last poll was started. This would prevent running polls in 
parallel, fighting for attention from Dovecot and which in the end is 
just a waste of resources.

Saved Queries