1

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.

DaedalusFall
  • 197
  • 2
  • 12
  • Are the clients running Outlook express? – NickW May 03 '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 03 '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 03 '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 03 '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 03 '13 at 14:53
  • Okay, removing the dovecot-uidlist gets rid of the error - good start. Only problem is that now If I 'send/recieve' in outlook all the messages get downloaded again as duplicates! I assume this is because the uid's have changed. Is there anything I can do about that? – DaedalusFall May 03 '13 at 15:29
  • That's a good question, basically, something went wrong with the migration, you can see in the dovecot error, the 140th message became the first, and it then exited, to stop what you just saw from happening. – NickW May 03 '13 at 15:32
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/8600/discussion-between-nickw-and-daedalusfall) – NickW May 03 '13 at 15:32

1 Answers1

2

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.

NickW
  • 10,263
  • 1
  • 20
  • 27