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?