2

I created a new dovecot installation, and my client (Outlook 2013) is having trouble syncing (frequent errors). On the server side I see the errors below.

Dec 01 17:14:36 imap-login: Info: Login: user=<myuser@mydomain.com>, method=PLAIN, rip=125.3.26.22, lip=172.16.15.26, mpid=13497, TLS, session=<8HjEPf17CuaHF+zy>
Dec 01 17:14:38 imap(myuser@mydomain.com): Error: Sync failed for mbox file /data/mail/mydomain.com/myuser: UID inserted in the middle of mailbox (10804 > 10802, seq=2, idx_msgs=1)
Dec 01 17:14:38 imap(myuser@mydomain.com): Error: Sync failed for mbox file /data/mail/mydomain.com/myuser: UID inserted in the middle of mailbox (10804 > 10802, seq=2, idx_msgs=1)

On the client side I see errors like

8:04:58 Error synchronizing folder
8:04:58          [800CCCD3-0-0-560]

I've seen some FAQ in Dovecot docs relating to OTHER programs manipulating the mbox store. However, I only run dovecot and postfix - nothing is manipulating messages on the server.

What is causing this?

TSG
  • 1,674
  • 7
  • 32
  • 51

1 Answers1

2

This has an answer in Dovecot's FAQ, in much too much detail to be copied here, but in short it means that messages are being moved around by something else than dovecot, which is not good. To quote, "It's fine if external software expunges messages or appends new ones. However moving around existing messages, inserting messages in the middle of the file or modifying existing messages isn't allowed."

I would recommend using Maildir, but maybe you don't have that option.

Law29
  • 3,557
  • 1
  • 16
  • 28
  • I have only postfix (adding messages) and dovecot (removing messages). Nothing else manipulating the mbox. I read the dovecot faq but I wasn't sure this was the case. – TSG Dec 02 '18 at 03:06
  • I only have virtual users (no local). Is it possible to use maildir in that situation? Can one switch without losing mail? – TSG Dec 02 '18 at 13:31
  • This seems like a dovecot v2.2.22 BUG. I switched to maildir and the problems went away. – TSG Dec 02 '18 at 14:26
  • Indeed, the problem cannot exist with Maildir (and I have never had any problems with Maildir in any case). I'm happy I was able to help! – Law29 Dec 02 '18 at 14:28