unknown
5/20/25

[#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 09/20/2013 (4260 days ago)
Due
Updated 12/17/2013 (4172 days ago)
Assigned 10/01/2013 (4249 days ago)
Resolved 11/12/2013 (4207 days ago)
Milestone 6.2
Patch No

History
12/17/2013 11:17:27 AM 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
11/12/2013 07:19:59 PM 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
10/01/2013 08:08:28 PM 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
10/01/2013 07:43:10 PM 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!
10/01/2013 06:51:16 PM Michael Slusarz Comment #2
Milestone ⇒ 6.2
Version ⇒ Git master
State ⇒ Assigned
Assigned to Michael Slusarz
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.
09/20/2013 09:51:28 AM arjen+horde (at) de-korte (dot) org Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Rate limit polling for new mail notifications
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ New
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