Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to copy of IMAP emails from one server to my new server but after Googling for hours and trying several tools, nothing is working. Is there a tool that actually works?

I am copying hundreds of thousands of emails so using a email client is out of the question, I tried it, and at the rate of a email per 2 seconds, it would take a few weeks or months! is commonly mentioned, however, the tool is no longer available.

I tried which just hangs and does nothing.

Any migration tools that work?

share|improve this question
up vote 1 down vote accepted

I think I might have gotten it to work [...] used the tool instead

I see what the problem is. There is a bug in that comes into play when the source and destination mailbox hierarchy prefixes are both "Inbox.". I have fixed it and posted the new version at does not have that problem.


share|improve this answer

You can use IMAPSync -

It works wonderfully for batch migrations...

share|improve this answer

I have heard good things about offline IMAP ( Not personally used it, but I know someone that has and he was very pleased with it

share|improve this answer

I tried which just hangs and does nothing.

I'm the author of those tools. I assume you ran

Try running it in debug mode with the -d and -I arguments and please update your original question with the results. That will hopefully give an indication of why it is hanging.

share|improve this answer
Hey Rick, I used the first, however, it generates error messages and nothing is copied:, I tried to use the tool, but it freezes and takes 100% of the CPU and produces no debug messages. – cappuccino Apr 15 '11 at 6:44
I think I might have gotten it to work, i deleted my destination IMAP account, recreated it, created all the folders from source manually and used the tool instead – cappuccino Apr 15 '11 at 7:01

If you are using Maildir, theres no reason why you cant just scp them.


share|improve this answer
More to the point, if you are not changing mailbox formats, scp will be much faster for all file based formats. – Jeff Strunk Apr 15 '11 at 21:26

if you are using the same imap backend, and rsync with compression (-avzr) maintaining permisions/dates is your best option.

if you are copying using the imap protocol because are changing imap backend:

my strategy:

i use Imapcopy ( for this process, with this tool i need a text file with user/passwords and folders to exclude from copy

i generate 10 files for imapcopy, to paralelize the copy operation via IMAP, and launch the files.

i did migrate from/to ms-exchange/dovecot/courier/cyrus for years with this procedure without problems (btw my preferable destination imap backend, cyrus)

i only did have problems with older Lotus Domino versions, this one serialize their IMAP operations and the procedure don't work.

share|improve this answer

I used Java program imapcopy. And it beats all other ways off.

share|improve this answer

Your Answer


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.