[Dovecot] (slightly OT) syncing / migrating IMAP mailboxes

Gunter Ohrner G.Ohrner at post.rwth-aachen.de
Tue Aug 28 09:31:57 EEST 2007


Hi!

I fear this may be slightly off-topic but it's both related to IMAP and to 
dovecot:

Is there any good and in paticular realiable program for synching / 
migrating one IMAP mailbox to another? The most important features for me 
is that a) no mails are lost / left out silently and b) the porgram is 
able to sync the complete mailbox including all folders without just 
giving up in the middle of the transfer. If it's somehow possible, I'd 
like to migrate directly from one IMAP account to the other, without 
running the synchronizer on one of the servers and without accessing one 
of the Maildirs directly.

I simply want to migrate my existing IMAP account from one Dovecot server 
(running 1.0beta5) to a new one (running 1.0rc15, as that's the version 
in Debian stable). Actually, a large part of the mailbox including most / 
all folders is already present on both servers, but I recently noticed 
that a few thousand mails are still missing.

The current mailbox state is the result of two earlier (obviously 
incomplete :-(   ) migrations a few months ago, from the original Dovecot 
1.0beta5 server to a Cyrus server, and - shortly thereafter - from there 
on to the currently used Dovecot 1.0rc15.

So far I've tried offlineimap, imapsync and mailsync, none of which seems 
to be really usuable. :-(

The current state with the incomplete mailbox was caused by mailsync. When 
I did the first two migrations, mailsync looked like the only program 
which worked, but seems to have "forgotten" the missing messages. Another 
extremely suspicious thing is that mailsync reports "phantom changes" if 
run again immediately after synching a folder and will start to delete 
and copy / "sync" dozends of messages even if none of the folders 
actually changed after synching.

I've read the name "imapsync" on this list several times, but I just tried 
it and just tried version 1.219. It happily starts synching the mailboxes 
and copying messages, but stops after partially synching the first 
folder - it simply exists, leaving no informational or error message 
whatsoever... Restarting imapsync will not help, it will appear to start 
synching the first folder again, but silently exit without doing 
anything.
Some of you seem to use imapsync as a migration tool for production 
systems, how do you cope with these situations and how do you ensure a 
mailboxs' migration actually completed successfully? As you're probably 
not playing Roulette with your customers' or companie's eMails, I'm 
interested in your receipts to successfully use imapsync myself.

As the third application I tried offlineimap (4.0.x-branch). During the 
migration a few months ago offlineimap (4.0.16 IIRC, synching from a 
Maildir to a remote IMAP account) was unusuable as it continuously and 
reproducibly threw exceptions at me during syncing obviously caused by 
specific messages in the accounts. Unfortunately, I wasn't able ti get 
any successful help on the offlineimap mailing list this time. :-(

Now, synching from one IMAP account to another, specifiying the new server 
as the "local" account, offlineimap did not throw exceptions caused by 
mail messages so far, but it's performance is unusuable. It seems to use 
the "local" IMAP account on my target sevrer in a way which causes 
Dovecot to utilize all CPU power, copying one message every 10 to 20 
seconds - this way, a sync would take ages and frequently aborts because 
of connection problems. The target server is an Athlon64 3700+ machine...

So, does anyone have any pratical solution on how to migrate one IMAP 
mailbox to another? For various reasons I'd really prefer to go with a 
tested and working, reliable solution instead of starting to debug 
complex non-working programs I do not halfway understand and for which I 
cannot seem to get reliably support from its authors and/or its user 
community... :-/

Thanks a lot in advance for any pointers to a solution,

  Gunter

-- 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
"The obvious mathematical breakthrough would be development of an easy 
way to factor large prime numbers."        -- Bill Gates from The Road 
Ahead, p265
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+                   PGP-verschlüsselte Mails bevorzugt!                 +
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://dovecot.org/pipermail/dovecot/attachments/20070828/7a35a4b2/attachment-0001.bin 


More information about the dovecot mailing list