I have been setting up a new mail server and copied our client's old mail to it. The old server has Courier (under Plesk), we're using Dovecot on the new server.

Most accounts seem to work fine (under IMAP or POP3), but for a few we're getting the following in the /var/log/mail.err.

Error: Message ordering changed unexpectedly (msg #1: storage seq 140 -> 1)
Fatal: Can't finish POP3 UIDL command

And the affected accounts can't get at their email. Things work ok if people switch to IMAP but for some of our clients that is a difficulty, so we really need POP3 working.

I used the Perl script given here to convert the mailboxes.

I've tried searching for these errors and all I get is referenced to Dovecot's source code, And I just don't know enough about POP3, UIDLs or Dovecot for that to help.

Thanks in advance for any help.

  • Are the clients running Outlook express? – NickW May 3 '13 at 14:34
  • Most are, yes, but I also set up one of the affected accounts on thunderbird and the same thing turns up in the logs when I try to fetch mail. – DaedalusFall May 3 '13 at 14:36
  • Do you have a (problematic) mailbox with a small amount of mail in it? If you do, try and rename the dovecot.index file to dovecot.back, and see if letting it rebuild helps the issue. – NickW May 3 '13 at 14:42
  • Thanks, but no luck there. I renamed the file in one mailbox, still getting exactly the same error. I also tried a restart of dovecot for good measure, wasn't sure if that was necessary. – DaedalusFall May 3 '13 at 14:50
  • Hmm, there should be a few different files, dovecot.index.cache, dovecot.uidl and dovecot.index.. try the index.cache next, then the uidl file. – NickW May 3 '13 at 14:53

Something went wrong in the migration, the uidl list did not get properly migrated, and dovecot does not want to reorder the uidl list because it will cause the mail client to see all the messages as new, and re-download them.

There may be some script options that resolve this, but the quick and dirty solution is to remove the dovecot-uidlist and let dovecot rebuild it, it will make the client re-download all of their mail, but afterwards, the uidlist will be valid and they will only download new mail. In the end, duplicate mails are an annoyance, not being able to receive new mails is a much larger problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.