[imp] New Mail notification latency

Michael M Slusarz slusarz at horde.org
Fri Jun 1 09:09:55 UTC 2012


Quoting Claude Tompers <claude.tompers at restena.lu>:

> Hi,
>
> I have a user with quite a large mail box (about 200 messages in the
> inbox and a gazillion folders).
> If he enables new mail notifications, it takes him about a minute to get
> it's inbox displayed.
> Is this normal behaviour because the system scans all folders or should
> it be faster ?

If he has a "gazillion" folders, and he is checking each one for  
newmail, than yes... this is expected.  From RFC 3501 [6.3.10]:

       Unlike the LIST command, the STATUS command is not guaranteed to
       be fast in its response.  Under certain circumstances, it can be
       quite slow.  In some implementations, the server is obliged to
       open the mailbox read-only internally to obtain certain status
       information...

            The STATUS command MUST NOT be used as a "check for new
            messages in the selected mailbox" operation (refer to
            sections 7, 7.3.1, and 7.3.2 for more information about
            the proper method for new message checking).

            Because the STATUS command is not guaranteed to be fast
            in its results, clients SHOULD NOT expect to be able to
            issue many consecutive STATUS commands and obtain
            reasonable performance.

Despite this warning, this is EXACTLY what everybody uses STATUS for.   
So recent IMAP extensions have directly addressed this issue.  You  
should upgrade to an IMAP server that supports LIST-STATUS (and/or  
mailbox stat caching) if you want to see much improved behavior.  Or,  
the better solution, is to disable the option to allow a user to poll  
all mailboxes.  THIS IS A TERRIBLE IDEA AND IS ALMOST CERTAINLY NOT  
WHAT THE USER WANTS.  NO USER SHOULD BE POLLING *ALL* THEIR MAILBOXES.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the imp mailing list