Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am not a mail server admin, however I've been given the task to migrate our company's current qmail server (running on Ubuntu 8.0) to a new Redhat Enterprise Linux server (RHEL 6.2).

After doing some research it seems that qmail is no longer being supported so I was thinking about installing Zimbra on the new server and then migrating the qmail users/mail boxes over to the zimbra server.

The current qmail server has 500 user accounts does not have any virtual domains nor aliases created.
We use courier-imap for user access with maildir as the mailbox format, and the mail accounts are created through an LDAP server.

My question is: What would be the best approach of getting all of the qmail server stuff over to the new zimbra server?.
Do I just need to copy everything and then change the MX record to point to the new server after everything has copied successfully?

share|improve this question

4 Answers 4

Hire someone to do this for you.

Really, I'm serious.

Mail systems are notoriously complex and fragile beasts. You admit that you are not a "mail server admin". It would be one thing if you were migrating to a similar system, but in this case, you're migrating to a completely different environment with a lot of moving parts. You really, really, don't want to do this yourself.

I know this probably isn't the answer you're looking for, but it is the best answer for your situation.

share|improve this answer
    
Erika what if I was to migrate to another qmail server running in red-hat 6 would that make the task more doable on my part? –  Miguel May 3 '12 at 20:57
    
@Miguel Get rid of qmail. Run as far and as fast as you can from that disaster. –  voretaq7 May 3 '12 at 21:00
    
Thanks voretaq7 for the advise, I am working on it. –  Miguel May 3 '12 at 21:01

The most reasonable way to migrate mailbox data in this case would be to use periodic synchronizations of the user accounts. I've done this between dissimilar mail systems using the Imapsync utility.

Since you have a separate server, this is something you can test on a small scale and allow specific users to try.

As stated I'm the earlier comments, there's more involved to doing a mail migration, so it may make sense to bring in an outside resource to manage the details.

share|improve this answer
    
Thanks for your comments. –  Miguel May 3 '12 at 21:08
    
+1 for imapsync-ing between the hosts for a live migration - this can also be used in the process I outlined (for the "IMAP-copying" bit). The only downside is I'm pretty sure it needs IMAP access (and thus the mail password) to each user's mailbox. –  voretaq7 May 3 '12 at 21:12
    
If you have an account that can see the full IMAP tree, having each user's password is not necessary. But I can't recall how to get that ability. On the new system, a default or dummy password is fine until you let users start accessing it. –  ewwhite May 3 '12 at 21:17

Your essential understanding of what needs to be done (copy everything over, make sure the accounts are all set up correctly, then swap the boxes) is correct, though I would advise swapping the IP address rather than the MX records (so you don't have to wait for DNS caches around the internet to figure out that the MX record has changed).

That said, it's a delicate process that requires you to do several things, and get them all right.
I've outlined one possible route to a migration below, there are others which will work equally well

  1. Disconnect both mail servers from the internet
    You can't be receiving mail during the migration, or you will lose things -- Connect both machines to a migration network for the time being.
    It helps if you have a reliable secondary MX server that can catch mail until you're done.

  2. Clone your users
    Check the Zimbra documentation to see if they have any advice here, but I think you'll have to create them all manually.

  3. Copy everyone's mail from the old server to the new server
    If Zimbra uses maildir format (it probably does) and courier-imap as its IMAP server you can just tar up each maildir and extract them into the appropriate places on the new server.
    You can also do this over the network (IMAP copying from the old server to the new one) but that will be substantially slower.

  4. Make sure you can see the mail you just copied
    Log in as yourself, and get a few other users to log in and test too.
    This means connecting some machines with IMAP clients to your migration network.

  5. Make sure you can receive mail
    This can be as simple as telnetting in on port 25 and having a quick SMTP conversation to send yourself a test message. You want to be sure that you can receive mail before you proceed with...

  6. Put the NEW server on the internet and test it
    Give it the IP of the old mail server, and repeat (5) from som external site like GMail.
    Also make sure you can send mail through the new server.

If you're unsure about any of the steps above take ErikA's advice and hire someone for a couple of days to do the migration for you. They will charge you an aggravation fee for dealing with email (probably more for dealing with qmail), but you'll look like an idiot if you break your company's email.

share|improve this answer
    
Thanks a lot voretaq7 for the comments. –  Miguel May 3 '12 at 21:13

First of all, congrats on moving away from qmail, it's an ancient nightmare that belongs with dinosaurs. As for moving to ZCS, there are multiple ways, most of them are described at http://wiki.zimbra.com/wiki/Mail_Migration

My fave is the IMAP migration tool, however, if you're buying Zimbra, definitely get the Zimbra guys to compose a solution for you, instead of experimenting. If you're going for the free version, you can build a test ZCS server in a VM or a temp box, before you go live.

As for users, Zimbra uses openLDAP internally, so you can either migrate the users over, or get ZCS to connect to the existing openLDAP server.

share|improve this answer
    
Thanks for the help.. –  Miguel May 3 '12 at 22:05

Your Answer

 
discard

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.