We just came across a mailbox today that, when accessed via POP3 or IMAP, crashes Dovecot. It seems to be another index-related corruption issue (as removing "dovecot.index" for INBOX fixed it);
Using POP3:
dovecot: Apr 09 10:28:14 Warning: POP3(USERNAME): Maildir /mail/USERNAME/Maildir: UIDVALIDITY changed (1145576765 -> 1207677483)
dovecot: Apr 09 10:28:14 Panic: POP3(USERNAME): file index-sync.c: line 39 (index_mailbox_set_recent_uid): assertion failed: (seq_range_exists(&ibox->recent_flags, uid))
dovecot: Apr 09 10:28:14 Error: POP3(USERNAME): Raw backtrace: pop3 [0x80c04e4] -> pop3 [0x80c013c] -> pop3 [0x808eb9a] -> pop3(index_mailbox_set_recent_seq+0x3e) [0x808ebde] -> pop3(maildir_sync_index+0x923) [0x8064173] -> pop3 [0x8062e22] -> pop3(maildir_storage_sync_init+0x58) [0x8062f98] -> pop3(mailbox_sync+0x1f) [0x80912af] -> pop3(client_create+0x1de) [0x805968e] -> pop3(main+0x403) [0x805b503] -> /lib/libc.so.6(__libc_start_main+0xdc) [0x707dec] -> pop3 [0x8058e71]
dovecot: Apr 09 10:28:14 Error: child 28169 (pop3) killed with signal 6
Using IMAP (after "SELECT INBOX"):
dovecot: Apr 09 10:56:31 Warning: IMAP(USERNAME): Maildir /mail/USERNAME/Maildir: UIDVALIDITY changed (1145576765 -> 1207677483)
dovecot: Apr 09 10:56:31 Panic: IMAP(USERNAME): file index-sync.c: line 39 (index_mailbox_set_recent_uid): assertion failed: (seq_range_exists(&ibox->recent_flags, uid))
dovecot: Apr 09 10:56:31 Error: IMAP(USERNAME): Raw backtrace: imap [0x80cd564] -> imap [0x80cd1bc] -> imap [0x809b32a] -> imap(index_mailbox_set_recent_seq+0x3e) [0x809b36e] -> imap(maildir_sync_index+0x923) [0x8070903] -> imap [0x806f5b2] -> imap(maildir_storage_sync_init+0x58) [0x806f728] -> imap(mailbox_sync+0x1f) [0x809da3f] -> imap(cmd_select_full+0xd5) [0x805dec5] -> imap(cmd_select+0x19) [0x805e069] -> imap [0x805f799] -> imap [0x805f827] -> imap [0x805ffb5] -> imap(client_input+0x5e) [0x80601ce] -> imap(io_loop_handler_run+0x100) [0x80d4d50] -> imap(io_loop_run+0x28) [0x80d42e8] -> imap(main+0x4ac) [0x8067bdc] -> /lib/libc.so.6(__libc_start_main+0xdc) [0x125dec] -> imap [0x8059d61]
dovecot: Apr 09 10:56:31 Error: child 7057 (imap) killed with signal 6
We made a copy of the mailbox and index in case any further testing would be helpful,
-Rich