Figure 1: UID error indicating an unexpected change to a message
The first error reads:
The UID of a message changed unexpectedly. This typically indicates a server bug. Your program may not function properly after this.
IFigure 2: UID error indicating a message that doesn't comply with the IMAP Standard
The text of the second error reads:
Your server reported a UID that does not comply with the IMAP Standard. This typically indicates a server bug. Your program may not function properly after this.
The text of these errors hasn't changed in 10 years (maybe more). It doesn't typically indicate a server "bug," but certainly errors, corrupted content, or poor implementation on the server could lead to such problems on a client. Outlook just doesn't handle this situation well. There's no way to access Outlook again until these errors are cleared. A bigger problem occurs if you were very active with the web client while Outlook was open to that account. The UID errors might pop up for every message you highlight in Outlook that was changed or opened in another client. If you deleted 20 messages through the web interface and Outlook was open with IMAP access to that mailbox, you could potentially be clearing 40 UID error notifications when you return to Outlook.
Outlook synchronizes folders on the IMAP server when the IMAP account is first accessed in Outlook after startup. These errors seem to arise when Outlook is expecting something that's no longer there or has been altered by a different source. When you click OK on the errors, Outlook accepts the change, essentially resetting Outlook's expectation of UID order, so you'll be back to normal. Restarting Outlook will also resynchronize the IMAP folders. If you initiate protocol logging on the Outlook client, you'll be able to identify the error within the logs, as Figure 3 shows; however, the log doesn't provide insight to alleviate the problem. (For information about initiating protocol logging, see "Troubleshooting IMAP Connectivity in Outlook 2003.")
Implementation of IMAP is described in "RFC 3501: Internet Message Access Protocol—Version 4rev1." Section 126.96.36.199 of RFC 3501 explains unique identifiers and how they should be handled on an IMAP server. Most importantly, "the unique identifier of a message MUST NOT change during the session." Outlook doesn't do a good job of handling subtle IMAP server violations of the UID aspect of RFC 3501.
For Outlook 2002, Microsoft released a support article advising users to remove the IMAP account and recreate it (see "OL2002: Error Message: 'Your Server Has Reported a UID Which Does Not Comply with the IMAP Standard'"). This process really isn't necessary if the cause of the UID errors is simply making changes to the IMAP content from another source while Outlook is accessing the account. After you clear the UID errors, you can continue with Outlook as before.
Remember the anecdote about the patient who tells the doctor, "It hurts when I do this," and the doctor replies, "Don't do that"? Well, the same principle applies here: Don't access a mailbox with web access while Outlook has an open connection to that mailbox using the IMAP client protocol and you won't encounter this problem. If you do leave Outlook with IMAP access to a mailbox and access that mailbox from an alternate client, you might have some UID errors to accept when you get back to Outlook. The best solution might be to close Outlook if you're using IMAP and expect to access your mailbox with other clients.