On Wed, 25 Sep 2002 10:20:56 -0700, Larry Osterman wrote: > Nit: Should it be "should" or "SHOULD" in "The server should respond > with a tagged BAD" below?
In general, I've avoided placing requirements on server handling of errors. In my opinion, a compliant server could treat "FETCH *" of an empty mailbox as the command to set the hard drive on fire, launch nuclear missiles on Disneyland, and give the system manager a bad haircut... The philosophy here is GIGO ("Garbage In, Garbage Out"); you can't predict subsequent behavior if you violate the standard, so don't violate the standard. > Also, the UIDNEXT value? Is this right? It was for lack of a better choice. The problem with saying "last assigned UID" is that in a newly-created mailbox, there is no "last assigned UID" and zero is not a possibility. > < Mailbox is empty, client believes there are 0 messages in the inbox > > < Message arrives in mailbox > > C: 1 UID FETCH * (RFC822.HEADER) > S: * 1 EXISTS IMHO, this is a timing race. Either UID 1 doesn't exist at the time that the command is executed, or it does exist. So, the scenario should be one of: C: 1 UID FETCH * (RFC822.HEADER) S: * 1 EXISTS S: 1 OK done or C: 1 UID FETCH * (RFC822.HEADER) S: * 1 EXISTS S: * 1 FETCH (UID 1 RFC822.BODY {xx} <Body of newly received message>) S: 1 OK done I do not think that: S: * 1 FETCH (UID 1 RFC822.BODY NIL) should ever be returned. This is the worst of both possibilities. Can you look into what Exchange does? Fortunately, I don't think that it should be a major problem, since I doubt that clients will ever do this. Clients are much more likely to do "UID FETCH 1:*". I assume that you'd agree that C: 1 UID FETCH 1:* (RFC822.HEADER) S: * 1 EXISTS S: * 1 FETCH (UID 1 RFC822.BODY NIL) S: 1 OK done is a definite bug!