Transferring lots of messages between IMAP accounts

11

11

I have to move many, many emails (over a thousand) from an old IMAP hosting provider to a new IMAP hosting provider. I know I can just set up the old and new accounts in Thunderbird and drag and drop, but it's very slow and keeps timing out. Is there a better, more automated way to copy all messages (and all mailboxes) between IMAP servers?

Josh

Posted 2010-09-22T23:17:01.173

Reputation: 7 540

Answers

8

There are couple of options you could try:

Sathyajith Bhat

Posted 2010-09-22T23:17:01.173

Reputation: 58 436

Google apps Migration is a good tool, specially with Google Products! – JDuarteDJ – 2016-01-25T12:43:39.450

Wit Google Apps Also note that you are required to set up authorization with a new "console" project in Google. – JDuarteDJ – 2016-01-26T11:34:46.320

9

IMAPSync is the tool your looking for. IMAPSync

In the FAQ there are plenty of good examples

Davo

Posted 2010-09-22T23:17:01.173

Reputation: 199

On linux, it's also packaged in many distributions. – ETL – 2015-09-28T18:33:27.397

Asks for payment now :( – JDuarteDJ – 2016-01-25T12:38:49.967

@JDuarteDJ Actually check out https://github.com/imapsync/imapsync

– Swaroop C H – 2016-10-22T04:58:17.157

7

Use the reliable Mutt (http://www.mutt.org/).

  1. mutt -f imap://username@sourceimaphost/INBOX/folder
  2. Tag selected messages by t, or tag all messages by T and entering ~A. (With T, you can specify various patterns (http://www.mutt.org/doc/manual/manual-4.html#ss4.2).
  3. Move tagged messages by ;s("save") and enter imap://username@destimaphost/INBOX/folder. (This marks the source messages as deleted(D); if you don't want that, use ;C("copy") instead.)
  4. You can repeat 2 and 3 as needed.
  5. Quit by q. You may choose to purge the deleted messages.

This allows to move a folder from one account to another. Repeat this for multiple folders.

musiphil

Posted 2010-09-22T23:17:01.173

Reputation: 281

1You can also use imaps: instead of imap:. If the username part already contains a @ (e.g. as in Google Apps), replace it with %40. Example: imaps://username%40domain.com@imap.gmail.com/INBOX/folder. – musiphil – 2015-08-19T20:41:35.833

Has a windows Version (no cygwin) but it is limted. – JDuarteDJ – 2016-01-25T12:42:13.317

4

OfflineIMAP is another option (http://offlineimap.org/).

equaeghe

Posted 2010-09-22T23:17:01.173

Reputation: 291

Needs cygwin :( and python :( – JDuarteDJ – 2016-01-25T12:41:46.967

@JDuarteDJ: Did you downvote for the reasons you mention!? Given the question puts no restrictions on such things, that would be highly inappropriate. – equaeghe – 2016-01-25T21:08:29.973

@equaeghe I'm sorry that you find it inappropriate. I find that from the question one can understand that the solution should be as simple and direct as possible. I will give you the fact that no OS is mentioned so if one should consider a linux OS these limitations don't apply, I can't take it back but given this I would if I could. – JDuarteDJ – 2016-01-26T11:39:35.417

I didn't know it could do synchronisation too, but it does, and seems stable. Good idea! – qris – 2014-03-06T10:24:34.467

0

Originally we wrote this article on email migration issues: http://alloraconsulting.com/it-solutions/28-transferring-email-from-one-host-to-another

The article is pretty old, but after many years of occasional bulk migrations from IMAP into Exchange / IMAP it's OpenSource solutions that worked the best, like this one:

https://sourceforge.net/projects/migrationtool/

Martin

Posted 2010-09-22T23:17:01.173

Reputation: 1

0

You can also use isync/mbsync. Just used it (over a few days, due to quota limits imposed by Google and (specially) Apple) to copy a few dozen thousand emails from Gmail do iCloud. After the copy, deleting the emails on the GMail side was easier and faster (to delete everything) via the web interface.

For continuous retry (after disconnection due to quota limits) until successfully copying everything, one could run it like (bash):

$ while date +"%F %T Restarting..." && ! mbsync channel_name; do sleep 3600; done

spuk

Posted 2010-09-22T23:17:01.173

Reputation: 229