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 have a user on our Linux Dovecot/exim4 linux server with 10GB worth of e-mails, I need to migrate this account over to their new Exchange Server hosted on site.

How would I go about converting the mailbox into Exchange format? I'm hoping that tar'ing the inbox before downloading it will significantly compress it, but the major hurdle is converting it.

share|improve this question

You would use a tool like imapsync to transfer mail data directly from the old system to the new Exchange server if you manage or have user-level/administrative access to both systems. Alternatively, if the user is using Outlook, for instance, they can migrate their mail via local export to .PST or simply copy across to the newly-established mail account in the same client.

A better question is whether you need to move all 10GB of messages... It does not sound like you administer the new system...

share|improve this answer
The user is using Thunderbird at the moment, but will be switching to office in the future just to complicate things. I am the administrator for both systems. – Samuel Jones Dec 12 '11 at 12:49

I'm not sure if there is a tool for conversion between dovecot and exchange. But if both mailboxes are online (eg. user@server.tld and user@exchange.server.tld), you can use imapsync tool and migrate data via IMAP protocol. Package of imapsync is in all common distributions (debian and clones, RHEL and clones, ..)

Basic usage is written in man pages:

imapsync \
 --host1 --user1 foo --password1 secret1 \
 --host2 --user2 bar --password2 secret2
share|improve this answer
I've tried imapsync previously with their current temporary solution (gmail) which didnt work at all, I think thats an issue with imapsync and google though. -- Bandwidth and size is also my issue, I could really do with compressing the inbox before downloading. Thanks – Samuel Jones Dec 12 '11 at 12:41

Since the user is using Thunderbird as you said, the easy (and slow) solution is to enable IMAP on the Exchange Server, add this IMAP account to the user's Thunderbird and then have Thunderbird copy the messages.

imapsync was already mentioned, using mailutil from the UW-IMAP toolkit is another option to consider too.

share|improve this answer
up vote 0 down vote accepted

For those interesting in the solution I used:

I used 3 hosts in total, we'll call them dest, mid and source. dest and mid are on the same LAN.

using an SSH tunnel with compression I made a compressed tunnel between mid and source, in order to conserve bandwidth.

samuel@mephisto:~$ ssh -C -L 7777:source:993 localhost cat -

using this link in combination with imapsync ran on mid I'm successfully migrating in-boxes between the hosts without much trouble.

imapsync --host1 localhost --port 7777 --ssl1 --authmech LOGIN --user1 USERNAME1 --password1 PASSWORD1 --host2 dest --user2 USERNAME2 --password2 PASSWORD2 --authmech2 PLAIN

of course, your syntax may vary!

The only reasons I didnt run imapsync on dest or source were because

(a) I cant run it on dest since its a Microsoft Server, and

(b) if I ran it on source I wouldn't of been able to compress the IMAP session.

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.