Given this scenario, -> INBOX selected by client, 3 messages present. -> New mail is delivered into INBOX. -> Client issues, tag FETCH 1:* UID
The 3 (sensible) responses that spring to mind are:- 1) Status update received "at end of" command: S: * FETCH 1 (UID 1234) S: * FETCH 2 (UID 1235) S: * FETCH 3 (UID 1236) S: * EXISTS 4 S: * RECENT 1 S: tag OK FETCH completed Pros: response is consistent with client's view prior to command and during command. Cons: another fetch required to get information on the new message(s). 2) Status update received "at beginning of" command, results reflect client's view of mailbox *when it issued the command*. S: * EXISTS 4 S: * RECENT 1 S: * FETCH 1 (UID 1234) S: * FETCH 2 (UID 1235) S: * FETCH 3 (UID 1236) S: tag OK FETCH completed Seems odd but perhaps legal. Some servers seem to do this. 3) Status update received "at beginning of" command, results reflect the client's view of mailbox "at the time it receives the responses" S: * EXISTS 4 S: * RECENT 1 S: * FETCH 1 (UID 1234) S: * FETCH 2 (UID 1235) S: * FETCH 3 (UID 1236) S: * FETCH 4 (UID 1237) S: tag OK FETCH completed Pros: Gives the most up to date information. Cons: If the client doesn't take account of the EXISTS 4 properly it may be confused by the additional fetch response. Are all of these valid, if not am I missing something in the protocol? Is there a 'right' answer? I looked in the archives but couldn't find anything regarding this. Keith -- ----------------------------------------------------------------- For information about this mailing list, and its archives, see: http://www.washington.edu/imap/imap-list.html -----------------------------------------------------------------
