[Dovecot] mysteriously disappearing RECENT flag

Vadim Zeitlin vz-dovecot at zeitlins.org
Mon Jan 22 16:38:00 UTC 2007


 Hello,

 I've decided to switch from UW-IMAP to Dovecot and so installed 1.0.rc15-2
on a Debian/Etch system and started using it with the existing MBOX folders.
My configuration is pretty much the default one, in particular I didn't
touch to any of mbox_xxx options.

 The (hoped for) performance improvements were indeed quite noticeable and
mostly it works just fine but I seem to have one strange problem with the
recent messages: Dovecot seems to reset the RECENT flag on the message
right *before* the mailbox is opened. So even if a message was just copied
to a folder (e.g. by email client filtering), it doesn't have RECENT flag
when the mailbox is opened. Here is an example of what I see:

% telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS STARTTLS AUTH=PLAIN] Dovecot ready.
1 login user password
1 OK Logged in.
2 status test (messages recent unseen)
* STATUS "test" (MESSAGES 41 RECENT 0 UNSEEN 0)
2 OK Status completed.
[--- switch to another window and copy a message to the test folder ---]
3 status test (messages recent unseen)
* STATUS "test" (MESSAGES 42 RECENT 1 UNSEEN 0)
3 OK Status completed.
4 select test
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
* 42 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1048987099] UIDs valid
* OK [UIDNEXT 407] Predicted next UID
4 OK [READ-WRITE] Select completed.
5 status test (messages recent unseen)
* STATUS "test" (MESSAGES 42 RECENT 0 UNSEEN 0)
5 OK Status completed.
6 fetch 42 flags
* 42 FETCH (FLAGS (\Seen))
7 logout
* BYE Logging out
7 OK Logout completed.
Connection closed by foreign host.


 Why does Dovecot send "0 RECENT" when the mailbox is opened when it had
just told that there was a recent message in it? And why is the message
effectively old (no \Recent in the FETCH reply)? Notice that if I look at
the MBOX file I see "Status: R" until command number 7, it becomes "Status:
RO" only when I log out -- but internally Dovecot clearly considers it to
be old long before that.

 Am I doing something wrong? Or is this the expected behaviour and, in this
case, is there any way to change it to the more expected one (UW-IMAP-like)?

 Thanks in advance,
VZ



More information about the dovecot mailing list