I've been getting the following error fairly often, which tends to result in a corrupted dovecot-uidlist.
dovecot: IMAP(example@example.com): file maildir-uidlist.c: line 1009 (maildir_uidlist_recreate): assertion failed: (file_size == (uoff_t)st.st_size) dovecot: IMAP(example@example.com): Raw backtrace: imap [0x80cb740] -> imap [0x80cb64a] -> imap [0x8070e58] -> imap(maildir _uidlist_sync_deinit+0xe8) [0x8072d18] -> imap [0x806e9e2] -> imap(maildir_storage_sync_init+0x66) [0x806edf6] -> imap(imap_sync_init+0x4a) [0x80657da] -> ima p(cmd_sync+0x9d) [0x806590d] -> imap(cmd_store+0x33d) [0x805e1ed] -> imap(cmd_uid+0x57) [0x805e737] -> imap [0x805f009] -> imap [0x805f0ae] -> imap(client_inp ut+0x65) [0x805f6c5] -> imap(io_loop_handler_run+0x162) [0x80d3022] -> imap(io_loop_run+0x28) [0x80d2368] -> imap(main+0x4ab) [0x806723b] -> /lib/tls/i686/cmo v/libc.so.6(__libc_start_main+0xc8) [0xb7dfdea8] -> imap [0x8059551] dovecot: child 17997 (imap) killed with signal 6 dovecot: IMAP(example@example.com): rename(/home/vmail/domains/o/example.com/U/example/Maildir/dovecot-uidlist.tmp, /home/vmail/domains/o/example.com/U/example/Maildir/dovecot-uidlist) failed: No such file or directory dovecot: IMAP(example@example.com): unlink(/home/vmail/domains/o/example.com/U/example/Maildir/dovecot-uidlist.tmp) failed: No such file or directory dovecot: IMAP(example@example.com): rename(/home/vmail/domains/o/example.com/U/example/Maildir/dovecot-uidlist.tmp, /home/vmail/domains/o/example.com/U/example/Maildir/dovecot-uidlist) failed: No such file or directory dovecot: IMAP(example@example.com): unlink(/home/vmail/domains/o/example.com/U/example/Maildir/dovecot-uidlist.tmp) failed: No such file or directory
Followed sometime later by: dovecot: IMAP(example@example.com): Invalid data in file /home/vmail/domains/o/example.com/U/example/Maildir/dovecot-uidlist
Example of some corruption: ~/Maildir/dovecot-uidlist ... 7879 W193997 1195126451.4452.server023,S=191173:2,aopr :1195126451.4452.server023,S=191173:2,aopr ... 9628 W665454 1197354124.5254.server019,S=651976:2,pr <A0>% :1197354124.5254.server019,S=651976:2,pr
# dovecot -n # 1.1.beta11: /etc/dovecot/dovecot.conf base_dir: /var/run/dovecot/ protocols: imap imaps pop3 pop3s login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login verbose_proctitle: yes mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_debug: yes mmap_disable: yes mail_nfs_storage: yes mail_nfs_index: yes mail_executable(default): /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_plugins(default): fts fts_squat mail_plugins(imap): fts fts_squat mail_plugins(pop3): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap/ mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap/ mail_plugin_dir(pop3): /usr/lib/dovecot/modules/ imap_client_workarounds(default): delay-newmail imap_client_workarounds(imap): delay-newmail imap_client_workarounds(pop3): pop3_uidl_format(default): %08Xu%08Xv pop3_uidl_format(imap): %08Xu%08Xv pop3_uidl_format(pop3): %f pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh auth default: mechanisms: login plain cram-md5 digest-md5 username_format: %Lu verbose: yes debug: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth user: postfix group: postfix master: path: /var/run/dovecot/auth-master user: vmail group: vmail plugin: quota: maildir quota_rule: *:storage=102400:messages=30000 fts: squat