Migrate Maildir between courier and dovecot servers

Posted by DeaconDesperado on Server Fault See other posts from Server Fault or by DeaconDesperado
Published on 2012-03-26T22:31:12Z Indexed on 2012/03/26 23:31 UTC
Read the original article Hit count: 257

Filed under:
|
|

I have several tarballs that make up all the previous emails for two or three accounts on a mail server. This machine we be shut down within a few weeks and so I need to migrate all the previously subscribed IMAP folders to the new server. The old machine ran Dovecot with exim and delivered all mail to a virtual user folder on the server in maildir format.

The new machine uses courier and postfix, also configured to deliver through maildir. The new server is already setup and all clients are successfully logging in, the problem is migrating their old conversations.

I've tried moving the old message files directly and deleting the imap db that records which messages have already been fetched, but nothing has been successful. The outlook clients present an error for every message saying that the "message can no longer be located on the server."

Keeping the files chronologically sorted is not an object, I just need to migrate the old conversations over. Is there a way to do this in a batch operation that will allow the clients to login to the new server and treat these old messages as though they were new? What is the protocol for this kind of migration?

© Server Fault or respective owner

Related posts about imap

Related posts about courier