Hello all,
I think I'm hitting an issue with overly large UIDs in one of my mailboxes.
I initially thought it was a problem with claws-mail hitting an infinite loop. Claws-mail /seems/ to work fine, until it gets to this one mailbox, wherein the following is logged:
[20:23:04] IMAP> 86 SELECT LocalCron [20:23:04] IMAP< * OK [CLOSED] Previous mailbox closed. [20:23:04] IMAP< * FLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk NonJunk) [20:23:04] IMAP< * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk NonJunk \*)] Flags permitted. [20:23:04] IMAP< * 399 EXISTS [20:23:04] IMAP< * 0 RECENT [20:23:04] IMAP< * OK [UNSEEN 399] First unseen. [20:23:04] IMAP< * OK [UIDVALIDITY 1163720154] UIDs valid [20:23:04] IMAP< * OK [UIDNEXT 3069273506] Predicted next UID [20:23:04] IMAP< * OK [HIGHESTMODSEQ 120748] Highest [20:23:04] IMAP< 86 OK [READ-WRITE] Select completed (0.000 + 0.000 secs). imap-thread.c:1344:imap select run - end 0 imap-thread.c:388:generic_cb imap-thread.c:372:found imap 0x22c8f60 imap-thread.c:1431:imap select - end imap.c:3961:select: exists 399 recent 0 expunge 0 uid_validity 1163720154 can_create_flags 1 imap-thread.c:2018:imap fetch_uid - begin imap-thread.c:372:found imap 0x22c8f60 imap-thread.c:372:found imap 0x22c8f60 [20:23:04] IMAP- [fetching UIDs...] [20:23:04] IMAP> 87 UID FETCH 1:* (UID) [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< FETCH (UID 3069273244) [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< TCH (UID 3069273313) [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< TCH (UID 3069273382) [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< TCH (UID 3069273451) [20:23:04] IMAP< [FETCH data - 1024 bytes] [20:23:04] IMAP< [FETCH data - 551 bytes] imap-thread.c:2008:imap fetch_uid run - end 0 imap-thread.c:388:generic_cb imap-thread.c:372:found imap 0x22c8f60 imap-thread.c:2029:imap fetch_uid - end imap.c:542:unlocking session 0x22e4c00 imap.c:4663:get_num_list: got 399 msgs imap.c:4673:removing old messages from /home/darac/.claws-mail/imapcache/mail.darac.org.uk/darac@darac.org.uk/LocalCron imap.c:4677:get_num_list - ok - 399 folder.c:2265:Removed message 2147483647 from cache.
That last line (Removed message 2147483647 from cache) is repeated ad infinitum. Now, I happened to spot that that number is 2^31 - 1 so started looking to see if claws-mail was handling UIDs incorrectly. That lead me to http://wiki.dovecot.org/Clients/NegativeUIDs.
Firstly, that page states that UIDs should be 32-bit integers. If so, why do there appear to be UIDs greater than 3 billion in the mailbox?
Secondly, that page gives instructions on how to fix the problem with mbox and maildir backends. However, my mail is stored in mdboxes. Is there a way to re-generate UIDs for mdbox mailboxes?
Thanks in advance!