Migrating old mbox format to maildir- preserving UIDL values

dovecotemail-serverpostfixsendmail

I am attempting to migrate several hundred email accounts from an old server running sendmail 8.13.6/dovecot 0.99.14 (mbox format) to a new server running postfix 2.6.6/dovecot 2.0.9 (maildir format).

I tried migrating a couple mailboxes with dsync and also tried with imapsync, but in both cases the message UIDLs are being changed, which will obviously cause pop desktop clients to re-download all messages in their pop inbox, which in turn will yield a lot of angry calls and emails from my users.

The strange part is that apparently in the old dovecot 0.99.14, a different UIDL format was used: example old format UIDLs: 1391619175.6 and 1391619175.7 for two consecutive messages. New format UIDLs assigned to these two messages upon import: 0000000152f30760 and 0000000252f30760 using the format %08Xu%08Xv defined in dovecot.conf

And I am not seeing an option in the 0.9 version's dovdcot.conf file to indicate what format this is, so I'm not sure how to configure the new installation to mimic this format.

Any insight into a good way of preserving the old UIDLs would be greatly appreciated.

Best Answer

Take a look at POP3 migration in dovecots wiki.

You may:

Make dovecot use UIDL based on maildir file name: pop3_uidl_format = %f

OR

Make dovecot use UIDL based on X-UIDL: header : pop3_reuse_xuidl=yes

I suggest file name based way.