Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

the uidl change from one version to another may be addressed using the same "pop3_uidl_format" option on the target host as on the source host.

the old default seems to be %v.%u, according to

http://wiki1.dovecot.org/POP3Server

Try it...

Also, if I were in your site I would take a look at dovecotadm copy to see if it gives any better results (in term of performances), though you would have to use it from the target system as it was probably not part of 0.99.

You'll probably have to mount the FS of the old server to the new one, but once done, you could use something like:

doveadm import -u sam@middle.earth maildir:/var/mailmeo/middle.earth/f/frodo/MailDir . ALL
share|improve this answer
    
Thanks, this is the info I was looking for regarding format - I had missed this (wiki1.dovecot.org/Migration) where it lists the format used by Dovecot 0.99 –  Ryan Griggs Feb 6 '14 at 15:50
    
does it work better with this old default value? –  alxgomz Feb 6 '14 at 15:57
    
Here's an update: I changed the setting and now the correctly formatted UIDLs are returned. However, importing messages still does not retain the UIDLs from the original mail. I can manually edit the dovecot-uidlist file and change the starting UIDL and the number beside each message, then I get the correct UIDLs returned. However, even this doesn't stop Windows Mail from downloading all the messages again (apparently due to the changed POP3 Server Name setting). –  Ryan Griggs Feb 6 '14 at 20:03
    
So it looks like even getting the UIDLs to match will not prevent re-download if the servername changes. However, for this project, if I can get the UIDLs to match, I plan to switch the DNS to point to the new server so that the existing servernames do not need to be changed. More testing required... –  Ryan Griggs Feb 6 '14 at 20:05
    
Again, try using doveadm import, that should preserve the UIDs stored dovecot-uidlist file. I have updated my answer with an example. So you shouldn't have to edit the file manually which is tricky –  alxgomz Feb 6 '14 at 21:20

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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