Kris Kelley writes:

Our email servers run Courier IMAP 1.5.1  Today, a user showed me an
error message Outlook gave him, stating, "Your server has reported a UID
which does not comply with the IMAP standard.  This typically indicates
a server bug.  Your program may not function properly after this."  The
dialog box then shows this info:

   MsgSeqNum 12891, New UID 49023, Prev UID: 49023, Next UID: 0.

It appears two messages had the same UID, but when I looked at this
account's courierimapuiddb file, UID 49023 was assigned to only one
message.

Is it possible that the UID file was being updated at the same time
another program was getting a directory listing, therefore causing the
second process to see two messages with the same UID?  If not, what else
may have caused this?

If any additional info is needed, please let me know.  Thank you!
This must be some stupid MSOE bug. No matter how the server juggles UIDs, Courier-IMAP will NEVER report "Next UID: 0". MSOE definitely pulled that one out of its ass.

The only process that ever updates the UID file is Courier-IMAP. The UID file is not updated by anything that delivers mail. Furthermore, the only situations where two different Courier-IMAP servers would fight over the same UID file would be if the same poorly-written IMAP client somehow felt the need to log in two or more times, open the same folder in each login session, and request the server to check for new mail on both sessions, at the same time.

In the default server configuration, this may result in a situation with temporarily inconsistent UID assignments between the two sessions. Although the UID assignments are consistent within the context of the same IMAP session, they will not be consistent with each other.

This problem is entirely caused by the client. RFC 2060 does not guarantee that the same message will always have the same UID/UID-validity identifier:

[ * * * ]

The unique identifier of a message MUST NOT change during the
session, and SHOULD NOT change between sessions. However, if it is
not possible to preserve the unique identifier of a message in a
subsequent session, each subsequent session MUST have a new unique
identifier validity value that is larger than any that was used
previously.

[ * * * ]

MSOE's assumption that it can log in multiple times to the same folder, and receive the same UID/UIDvs for the same message is wrong. A server is well within its rights to generate a completely new UID set for each new log in (and, in fact, Courier-IMAP will do precisely that in certain rare pathological situations where filesystem hard quotas prevent it from saving the UID file itself).

Enabling the IMAP_USELOCKS option in the imapd configuration file will actually eliminate the first race condition, at the expense of performance. But that's a different story.





-------------------------------------------------------
This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to