Mail.app does not like it when a mail server reports the NEXTUID to be greater than 2^31 (which is the limit for signed 32-bit integers). I could end this post here, but it’s worth explaining how I got here, and how I fixed it… just incase.
A few weeks back, a faculty member hit quota for his email. This isn’t unheard of, but for some reason, this faculty member hit quota in such a way as to cause Dovecot (the central mail server’s mail service) to rapidly increase the UIDs for his email. I’m guessing something like the following happened.
- User is near quota, and receives message
- Dovecot writes out message to Inbox, but lazily updates dovecot-uidlist
- Delivery of message causes quota full
- Dovecot goes to update uidlist, but can’t since the quota is full. Which causes a race condition where it tries repeatedly to write it out, and in the process, increasing the base UID each time
- After this repeats a few thousand times, the user gets below quota again, and we end up with a NEXTUID of 3829200751 (yes, 3.8 Billion).
Now, there are two things you can think about this. One, is “this is a dovecot problem”. Well, yes, but… they’ve warned users not to store the uidlist files on quota enforced volumes:
Dovecot can’t currently handle not being able to write the control files, so it will cause problems with filesystem quota. To avoid problems with this, you should place control files into a partition where quota isn’t checked. ((http://wiki2.dovecot.org/MailLocation/Maildir))