Mailbox Status in Mailbox List

Many clients show number of unseen messages next to the mailbox name in mailbox list. The clients usually do this by sending STATUS command to all mailbox every few minutes. STATUS can be expensive to some servers though, so this isn't really recommended. However since users want that feature, such recommendations are pretty useless. There are a few things you can do to lessen the server's load though.

When you're connected to the server and you've got the list of mailboxes, send STATUS only to the mailboxes visible in your mailbox list. If some child mailboxes aren't visible, it's pointless to waste server's time on calculating their status. Also don't send STATUS to selected mailbox. It works badly with some servers, and you already know the selected mailbox's state so it's pointless to send the STATUS. Instead use simply a NOOP (or CHECK or IDLE) to find out if the selected mailbox has new messages.

When sending multiple LIST or STATUS commands, send them all at once pipelined so you don't waste time because of network latency. Take advantage of the LIST-STATUS extension if it's provided.

Recent counters

Clients rarely use \Recent flag counters. They can be very useful for people who tend to leave messages unseen as a way of marking them as "act on later". Seeing "37 unseen" isn't very helpful if you've no intention of marking those 37 messages as \Seen anytime soon. Having a non-zero recent count for non-selected mailbox however means that the mailbox really has messages that you haven't seen before. Such mailboxes could perhaps be marked with bold font or some other way in the client's user interface.

None: ClientImplementation/MailboxListStatus (last edited 2016-04-23 00:34:21 by 82-181-77-11)