14 Apr
2012
14 Apr
'12
12:50 p.m.
Hi list,
this question is related to the IMAP protocol itself, not really to Dovecot.
I'm trying to understand what is the more efficient way to maintain the number of unseen messages of the currently selected mailbox. RFC3501 says a client must not issue a STATUS command to the selected mailbox and that information sent by a SELECT is enough.
My current idea follows these steps :
- Issue a STATUS before the mailbox is selected => I know how many unseen messages it contains
- SELECT the mailbox => I got the eventual first unseen message in this mailbox but I don't understand how this info can be useful
- Maintain the unseen counter (on client side) according to what the user do
- Send a NOOP command every X minutes and look at the RECENT response to see if there are new messages
I think it works pretty well when the mailbox is opened only once. Let's imagine this mailbox is opened twice, by different clients. If one client marks a message as \Seen, how can the second client know about this change?
Thanks for your help,
Antoine Nguyen http://modoboa.org/