I've recently manipulated the contents of my maildir, changing the content of some mail files (mime handling and such...). This broke dovecot since it expected different filesizes while reading contents of files that were previously indexed. Therefore dovecot returned some assert like this:
imap(jwk@bug.it): file istream.c: line 163 (i_stream_seek): assertion failed: (v_offset <= stream->v_size)
Obviously, the solution was to remove indices and have dovecot recreate them. I suppose it would be more "polite" to have this kind of routines (i_stream_seek etc) handle this case by requesting indices recreation for indices that are no longer "real", instead of just dropping connection with some "internal error" message.
Giacomo Cariello, jwk@bug.it KeyID: 3072/1024/0x409C9044 Fingerprint: 7984 10FD 0460 4202 BF90 3881 CDE4 D78E 409C 9044
"Put that mic in my hand and let me kick out the jams!" - MC5