I've recently been given the task of configuring an IMAP based e-mail server solution that incorporates failover to a backup server. I have experience in this area, but it's all been single server stuff. I've been doing a lot of research into options regarding the failover aspect, but I'd like to get some input from people who have more experience than I when it comes to these sorts of things.

The requirements are for two geographically diverse servers, with failover configured in a active/passive configuration. Unfortunately, some parts of the solution have already been spec'd and ordered before I became involved. There are two servers, connected via a low latency, high bandwidth link within the relevant ISPs network. There's no shared storage/SAN available, just the two machines. The ISP has been tasked with providing a system which monitors the active machine and remaps a virtual IP address to the backup machine as required. An additional requirement is that all mailbox data must be preserved in the event of failover to the backup machine. This seems to rule out a simpler solution such as periodic rsync to the backup machine (please correct me if I'm wrong!).

After doing some research, I've come up with some possible alternatives. I haven't looked into each enough to really decide whether they're all viable options yet, but here they are:

  • DRBD realtime block level replication of mailbox data
  • Some sort of database backed mailbox storage with db replication configured
  • Use of built in replication features of IMAP server software

DRDB is starting to look increasingly complicated and might be out of reach bearing in mind my time constraints.

I should also mention that it'll need to be a Linux based solution. Almost certainly Centos/RHEL. As for which IMAP package to use, I'm open to using whatever meets my requirements. I'm currently looking into a few, including Dovecot, Cyrus and a couple of others.

I'm really looking for people's opinions regarding the options above and any other suggestions I may not have considered. I realise it may be difficult for you to give defintive answers without completely understanding all the factors involved, but any input is very much appreciated. I'm happy answer any questions on details if it would help tailor your answers.

Many thanks


Dovecot has a mailbox mirror utility (dsync) that could help you with that and would probably be very efficent because its on the highest level. I don't know how much resources would storing mailboxes inside a sql database need, but imo files are faster and easier to maintain.

  • Thanks, I'd had a quick look at dsync. Not sure it would meet the realtime requirement though as it looks as if it would be a scheduled periodic sync. – dbee Nov 28 '10 at 19:02

Low latency and high bandwidth sounds good for DRBD. Use the sync-mode (C) for replicating all related files - this will work if everything written to disk is transaction-save (depends on your IMAP-server).

But if there are built in mirror-techniques for your IMAP server - why don`t you use them? This will propably be more tranaction-save if you get a failover during a transaction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.