Inside Dovecot's Mailbox Index: How dovecot.index, Cache, and Log Power Fast IMAP
Dovecot avoids scanning raw messages by keeping per‑mailbox index files that map UIDs, cache parsed headers, and log every change. Understanding this trio lets you size storage, tune cache fields, and recover from corruption without guesswork.