Hi, --On Tuesday, April 23, 2002 7:51 PM -0700 Ashley Yakeley <[EMAIL PROTECTED]> wrote:
| So what is the best way for an IMAP client to detect recently arrived | mail in a hierarchy of around a thousand mailbox folders? Should it do a | SELECT on each one periodically? Or should it open up 1000 connections, | SELECT a folder and do IDLE on each one? The only sensible choice in this situation is probably STATUS command polling. You'll have to do one command for each mailbox. You could split that up over several connections running in background threads on the client so as not to affect user performance too much. In Mulberry we choose to implement a scheme where a user can set up multiple 'alert styles' that allow them to set different polling intervals. You can then apply that to different mailboxes. For example, I have one style set to poll every minute and that acts on my INBOX plus some other important mailboxes, another style is set for every ten minutes for less important mailboxes, another set for every half-hour for mailing lists, and another set to check only when the app is started for mailboxes I'm not too bothered about. This allows the user to set their own precendence for new mail notifications. This works pretty well for my setup with about 50 mailboxes in total being checked. I suspect 1000 is really pushing it though. If that were something that needed to be done a lot, then a better approach would be a multi-mailbox IDLE extension, or one of the mailbox notification protocols that are being discussed (e.g. the SNAP protocol discussed in IMAPext/VPIM groups). -- Cyrus Daboo