<DKIM> Maildir -> Restore to IMAP server
Pluto Crat
plutocrat at gmail.com
Tue Dec 23 01:42:47 GMT 2014
Hi Nicholas,
Thanks for your very clear and thorough instructions. All is good now,
and hopefully anyone else having a similar problem will be able to find
the answer in this mailing list! Perhaps one for the FAQ?
While I'm writing, I thought I'd mention how I got in this position in
the first place. I have an account with Mediatemple. I was hosting a
domain for a friend, and wanted to transfer it from my account to his
account. However it was impossible to set up the domain on both accounts
at the same time, so I needed to make a copy of his email, delete the
account on the source end, and then create it on the target end. It was
frustrating because I knew that if I talked to the right tech person,
they could just move the maildir between accounts. If I'd had access to
the server myself, I could have done it in seconds, rather than the 6
hours it took me to make a local copy and re-upload it. Ah well. Its all
over now.
Thanks again. And thanks for offlineimap.
On Tuesday, 23 December, 2014 12:05 AM, Nicolas Sebrecht wrote:
> On Mon, Dec 22, 2014 at 05:23:04PM +0800, Plutocrat wrote:
>
> <...>
>
>> So I looked in the FAQ and saw that the answer lay in the cached
>> information. However the solution is to delete the contents of the
>> maildir and cache, which is not what I want to do as this is now the
>> only copy of the mail!
> Not true, AFAIR. While this is the strong way, deleting the cache is
> enough. It might be worth to make a backup of the maildir before
> proceeding, though.
>
>> So ... what is the correct way to get these mails from the Local
>> maildir copy into the new IMAP account? The account owner is standing
>> behind me tapping his foot, so I need to figure it out swiftly!
> The best way is to let OfflineIMAP recreate its cache according to the
> new server, from scratch.
>
> 1. Move the maildir directory to maildir.old. Create a new empty
> maildir directory.
>
> 2. Delete the cache. OfflineIMAP is now ready to start from scratch as
> if it was its first execution.
>
> 3. Run OfflineIMAP once. Now, it has a clean cache and a fresh maildir
> content.
>
> 4. Then, we want to copy the content (your raw mails) from maildir.old to
> maildir. Compare the trees between the old and new maildir before
> copying.
>
> Depending of what was done while migrating the IMAP server, your might
> find the exact same trees or not. If not, there two alternatives:
> - tune your OfflineIMAP configuration to have the new tree matching the
> old one. This requires deleting the maildir and re-sync to not have
> unexpected upload sync due to changed nametrans rules or whatever.
> This is the hard way.
> or
> - manually copy the emails from the old maildir to the new maildir on a
> per-folder basis. This should be the easy way.
>
> 5. Re-sync. The local mails are synced back to the server.
>
More information about the OfflineIMAP-project
mailing list