summaryrefslogtreecommitdiffstats
path: root/doc/wiki/Clients.NegativeUIDs.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
commitf7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch)
treea3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /doc/wiki/Clients.NegativeUIDs.txt
parentInitial commit. (diff)
downloaddovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz
dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/wiki/Clients.NegativeUIDs.txt')
-rw-r--r--doc/wiki/Clients.NegativeUIDs.txt53
1 files changed, 53 insertions, 0 deletions
diff --git a/doc/wiki/Clients.NegativeUIDs.txt b/doc/wiki/Clients.NegativeUIDs.txt
new file mode 100644
index 0000000..28fc164
--- /dev/null
+++ b/doc/wiki/Clients.NegativeUIDs.txt
@@ -0,0 +1,53 @@
+Negative UIDs
+=============
+
+---%<-------------------------------------------------------------------------
+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.
+
+mbox
+----
+
+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 newer Dovecot versions 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.
+
+In any case it's still a good idea to filter out X-UID: and other metadata
+headers in your MDA. <Dovecot's deliver> [LDA.txt] does this internally. See
+<MboxProblems.txt> for a list of headers to filter out.
+
+Fixing
+------
+
+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.
+
+mbox
+----
+
+Delete Dovecot's index files (eg. '.imap/INBOX/') and X-IMAP: and X-IMAPbase:
+headers from the mbox file.
+
+Maildir
+-------
+
+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.
+
+(This file was created from the wiki on 2019-06-19 12:42)