Dovecot corrupted cache

I’m using K9 to read mail from my own server running dovecot. I’m the only one using K9, but there are other people also reading mail via imap. I’m the only one the following errors ever occur for:

Error: Mailbox INBOX: UID=399656: read(/var/mail/user) failed: Cached message size smaller than expected (79352 < 79364, box=INBOX, UID=399656) (FETCH BODY[])
Error: Mailbox INBOX: Deleting corrupted cache record uid=399658: UID 399658: Broken physical size in mailbox INBOX: read(/var/mail/user) failed: Cached message size smaller than expected (2557470 < 2557483, box=INBOX, UID=399658)

I suspect that K9 may be triggering this. I’m wondering if anyone else has had this problem and found a solution, for example, maybe some config option to dovecot to make it work well with K9?

Sorry, but if a client could corrupt the server, that’s a server issue. That said, this does not mean that K9 could not corrupt messages on the server in the ways allowed by the IMAP protocol, but that would not result in server-side errors.

Could K9 be using an IMAP extension that other clients don’t or maybe it could be using some extension differently which is triggering a bug in dovecot?