[Dovecot] needing UNSELECT to notice new mail?

Greg Troxel gdt at ir.bbn.com
Thu May 24 15:48:14 EEST 2007


I am running

  NetBSD/i386 3.1ish and 4.0ish

  dovecot 1.0.0
  procmail delivering into maildirs

  gnus from CVS head
  emacs 21.4

  thunderbird 2
  gnome mail-notification 4

configured to required SSL.

Basically everything works fine except that in gnus typing 'g' in the
*Group* buffer, which is supposed to check for new mail and list the
number of new messages, fails to notice new mail.

Notably, gnus does not do an UNSELECT or CLOSE when it is done with a
group.

So basically the following sequence of commands

  SELECT "INBOX"
  blah blah
  EXPUNGE

  STATUS "INBOX"
    shows no unseen but really there is one


With

      (setq nnimap-need-unselect-to-notice-new-mail t)

gnus will do UNSELECT before STATUS, and then things work fine.

Another gnus user reports what seems like the same problem with Courier
IMAP.

So, is dovecot complying with the IMAP spec here?  Is there some notion
of a transaction bracketed by SELECT/{UNSELECT,CLOSE}, and is that using
something like READ COMMITTED isolation so that it doesn't see messages
added by other transactions?

Or should dovecot be not relying on cached state and revalidate the
mailbox on STATUS, even if it is already SELECTED?

Further, is it the group's opinion that a well-behaved client would
UNSELECT or CLOSE when the user takes an action that indicates being
finished with a mailbox?   Or is it reasonable to leave a mailbox
SELECTed as an optimization.   It seems that for Thunderbird, etc., the
user sits in INBOX with IDLE, but with gnus I tend to be in *Group* with
no mailboxes selected.



More information about the dovecot mailing list