Revision 1 as of 2007-05-09 08:00:12
converted to 1.6 markup
|Deletions are marked like this.||Additions are marked like this.|
|Line 17:||Line 17:|
|In any case it's still a good idea to filter out X-UID: and other metadata headers in your MDA. [:LDA:Dovecot's deliver] does this internally. See MboxProblems for a list of headers to filter out.||In any case it's still a good idea to filter out X-UID: and other metadata headers in your MDA. [[LDA|Dovecot's deliver]] does this internally. See MboxProblems for a list of headers to filter out.|
Invalid messageset: 1181461470:-1181461446.
IMAP uses unsigned 32bit integers for unique message identifiers. Unfortunately a lot of IMAP clients use 32bit signed integers, which means that if the UIDs go higher than 2147483647, they'll wrap to negative integers. This causes errors such as above.
However normally the UIDs should never go that high, so it's possible to avoid this problem.
Earlier Dovecot versions had bugs which could cause X-UID: headers in incoming messages to grow the UIDs too high. Some spam messages especially contained these intentionally broken X-UID: headers.
With Dovecot v1.0 these broken X-UID: headers aren't practically ever used. It happens only if the mail has a valid X-IMAPbase: header, X-UID: header and the mail is written to an empty mbox file. Note that this can happen only new mboxes, because expunging all messages in a mailbox causes Dovecot to create a metadata message at the beginning of the mbox file.
Fixing is done by letting Dovecot update UIDVALIDITY value and recreate the UIDs beginning from one. This means that client's local cache will be invalidated and the client will be required to download all the messages again.
Delete Dovecot's index files (eg. .imap/INBOX/) and X-IMAP: and X-IMAPbase: headers from the mbox file. If you're using an older Dovecot version than v1.0, you might need to delete also all the X-UID: headers.
This should really never be a problem with Maildir. If however you have managed to cause it somehow (by receiving 2 billion mails?), you can recreate the UIDs by deleting dovecot-uidlist file.