imapd v2.4.17: UID SEARCH ALL vs. UID SEARCH 1:*

Thomas Jarosch thomas.jarosch at intra2net.com
Thu Jul 10 09:42:16 EDT 2014


Hi,

I just discovered an interesting behavior and I'm wondering
why cyrus-imapd 2.4.17 behaves the way it does:

Basically I do this:

- Select a mailbox
- Get the list of UIDs via "UID SEARCH 1:*"
- Add a new message in another client / connection
- Get the list of UIDs again via "UID SEARCH 1:*"

-> the UID list stays the same on the original connection,
it does send an increased "EXISTS" counter though. If I reissue
the "UID SEARCH 1:*" command, it includes the new UID.

If I do the same with the "UID SEARCH ALL" command,
it immediately shows the new UID after adding the message.
An updated "EXISTS" response is sent, too.


Any clue what's going on? Why is the "ALL" keyword more special than "1:*"?

Here's the protocol dump:

. SELECT INBOX/Entw&APw-rfe
* 1 EXISTS
* 0 RECENT
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen $mdnsent)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $mdnsent \*)] 
Ok
* OK [UIDVALIDITY 1387207616] Ok
* OK [UIDNEXT 100015] Ok
* OK [HIGHESTMODSEQ 23] Ok
* OK [URLMECH INTERNAL] Ok
. OK [READ-WRITE] Completed

. UID SEARCH 1:*
* SEARCH 1
. OK Completed (1 msgs in 0.000 secs)

---------- new message was added in between by another client ----------

. UID SEARCH 1:*
* 2 EXISTS
* 0 RECENT
* SEARCH 1
. OK Completed (1 msgs in 0.000 secs)

---------- doing another UID SEARCH 1:* ----------

. UID SEARCH 1:*
* SEARCH 1 100015
. OK Completed (2 msgs in 0.000 secs)






*** now the same with "UID SEARCH ALL" ***
. SELECT INBOX/Entw&APw-rfe
* 2 EXISTS
* 0 RECENT
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen $mdnsent)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $mdnsent \*)] 
Ok
* OK [UIDVALIDITY 1387207616] Ok
* OK [UIDNEXT 100016] Ok
* OK [HIGHESTMODSEQ 24] Ok
* OK [URLMECH INTERNAL] Ok
. OK [READ-WRITE] Completed
. UID SEARCH ALL

* SEARCH 1 100015
. OK Completed (2 msgs in 0.000 secs)

---------- new message was added in between by another client ----------

. UID SEARCH ALL
* 3 EXISTS
* 0 RECENT
* SEARCH 1 100015 100016
. OK Completed (3 msgs in 0.000 secs)


Cheers,
Thomas



More information about the Cyrus-devel mailing list