Hi, I'm new to this list and want your help. I'm the mail admin for some domains in Rio de Janeiro - Brazil. Today we have only one machine running dovecot (imap+pop3) with local mail. We are migrating to two virtual machines in kvm running in separate hosts. Then we have two main problems: - How to share mail files to both dovecots? We've been thinking about NFS using local indexes. Is this a good approach? - How do we have a fault tolerant mail servers? Our first solutions is using two IP addresses in our DNS records. About NFS using local indexes, I'm configuring a test server. But how to configure local indexes when my mail_location comes from sql (userdb_home actually). I'm using dovecot 1.2.9. I guess you already had some of these problems or maybe in another architecture these neither exists. Thanks for any help, Marcelo
On Mon, 28 Nov 2011 20:14:19 -0200, Marcelo Salhab Brogliato <msbrogli-dovecot at vialink.com.br> wrote:> Hi, > I'm new to this list and want your help. > I'm the mail admin for some domains in Rio de Janeiro - Brazil. Today we > have only one machine running dovecot (imap+pop3) with local mail. > We are migrating to two virtual machines in kvm running in separatehosts.> Then we have two main problems: > - How to share mail files to both dovecots? We've been thinking aboutNFS> using local indexes. Is this a good approach? > - How do we have a fault tolerant mail servers? Our first solutions is > using two IP addresses in our DNS records. > > About NFS using local indexes, I'm configuring a test server. But how to > configure local indexes when my mail_location comes from sql(userdb_home> actually). > I'm using dovecot 1.2.9. > > I guess you already had some of these problems or maybe in another > architecture these neither exists. > > Thanks for any help, > > MarceloMarcelo, There are a number of ways to bring HA to a cluster of mail servers, one that we have experimented with lately is a bit exotic, but might work for you.>From the base layer we are experimenting with GlusterFS, distributed andreplicated file system that offers very simple management and high availablity. It does run in userspace, which according to some will suffer from performance bottlenecks, but so far we have not seen any serious problems while running on 15k disks in raid 10. Assuming you have two virtual machines you could create a distributed file system between them, and have a mirrored copy of the data on both. Next is dovecot/postfix/webmail which would be setup to use the local GlusterFS mount on the system containing the mail storage and indexes. To provide HA on the connectivity side we used ucarp, which creates a virtual IP address between two servers and fails that virtual IP over to another server in the event of a server going down. I personally would never use DNS load balancing (two IPs for one DNS name) as it would round robin to each server regardless of whether it is running or not. This is somewhat exotic, but it works and provides a very high level of availability. However with HA comes more complexity and management. Good luck and let me know if you would like more specifics.
Am 28.11.2011 23:14, schrieb Marcelo Salhab Brogliato:> Hi, > I'm new to this list and want your help. > I'm the mail admin for some domains in Rio de Janeiro - Brazil. Today we have only one machine running dovecot (imap+pop3) with local mail. > We are migrating to two virtual machines in kvm running in separate hosts. Then we have two main problems: > - How to share mail files to both dovecots? We've been thinking about NFS using local indexes. Is this a good approach? > - How do we have a fault tolerant mail servers? Our first solutions is using two IP addresses in our DNS records. > > About NFS using local indexes, I'm configuring a test server. But how to configure local indexes when my mail_location comes from sql (userdb_home actually). > I'm using dovecot 1.2.9. > > I guess you already had some of these problems or maybe in another architecture these neither exists. > > Thanks for any help, > > Marcelo >i have run , store drbd with ocfs behind keepalived loadbalancers this should run with vm too, but it might not optimal, depening i.e how much mailboxes etc search this list archive, there were posts about equal issues -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
On 28/11/2011 23:14, Marcelo Salhab Brogliato wrote:> Hi, > I'm new to this list and want your help. > I'm the mail admin for some domains in Rio de Janeiro - Brazil. Today we have only one machine running dovecot (imap+pop3) with local mail. > We are migrating to two virtual machines in kvm running in separate hosts. Then we have two main problems: > - How to share mail files to both dovecots? We've been thinking about NFS using local indexes. Is this a good approach? > - How do we have a fault tolerant mail servers? Our first solutions is using two IP addresses in our DNS records. >For imap i need only 1 VIP both for loadbalancing or HA, for SMTP u can use dns failover with multiple mx records.> About NFS using local indexes, I'm configuring a test server. But how to configure local indexes when my mail_location comes from sql (userdb_home actually). > I'm using dovecot 1.2.9.I suggest to not use local indexing (for high i/o after failover) , anyway NFS for HA setup works well! If u need a cluster (master/master) consider having an HA loadbancer (dovecot director): -- Simone Caruso IT Consultant +39 349 65 90 805