[Dovecot] needing UNSELECT to notice new mail?

Timo Sirainen tss at iki.fi
Thu May 24 16:08:12 EEST 2007


On Thu, 2007-05-24 at 16:03 +0300, Timo Sirainen wrote:
> > Or should dovecot be not relying on cached state and revalidate the
> > mailbox on STATUS, even if it is already SELECTED?
> 
> Dovecot checks if new/ or cur/ directory's mtime changed. If neither
> did, it trusts its cached state (basically, there's another
> dirty-recheck-rule).

Ah, right. I tested it immediately after replying and looks like STATUS
for a selected mailbox is a bit special. It doesn't synchronize the
mailbox before or after the lookup. I'm not sure if there's a reason for
this, but this most likely won't get fixed for v1.0.x.

So perhaps I should change my words a bit :) A well behaving client
should keep track of the mailbox state of the selected mailbox. Instead
of doing a STATUS (or UNSELECT+STATUS) you should just do NOOP or IDLE
there all the time, and keep track of the STATUS elements you're
interested in yourself instead of asking what you already should know..

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070524/ad6dd28b/attachment.bin 


More information about the dovecot mailing list