Hi Timo.
I've checked out the current CVS version and tested it. There seems to be a problem when dovecot accesses mailboxes for the first time:
I have a mailbox with 4 mails, and no special IMAP headers. (no X-IMAPBase, X-UID etc.) and it's in mbox format.
I log in, SELECT the folder and do FETCH 2 BODY[] and receive only a snipplet of the mail from somewhere in the middle of it.
After some debugging it seems like dovecot:
- creates an index, for mbox_index_rewrite(),
- rewrites the mbox, but then
- forgets to update the index after the rewrite. and ends up in a state with a pre-rewrite index but a post-rewrite folder.
Now, there are many ways to make dovecot rebuild the index after rewriting the folder, but some are ugly and some are not, some need extra code to avoid endless loops. I don't know how you would want this fixed.
I attached a patch that worked for me.
After that patch, I have more (new?) problems, which may or may not be related.
Now, when I SELECT a folder and do a COPY within the folder (*smile*) I get this:
A COPY 1 INBOX
- BYE Mailbox is in inconsistent state, please relogin. Connection closed by foreign host.
... which is what I'm gonna start looking for right now. :)
Regards, Andy