1

Topic: iredmail multiserver install

I configured iredmail succesfully on freebsd 8.0 on a single server,I want to configure iredmail on more than one server in cluster mode or u can say for load distribution ,is there any docs available for this.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iredmail multiserver install

I am interested in this as well. I sort of have a hack for this at the moment, iredmail is run in as a xen vm in my xen cluster. I have a dupe of it in case the initial install goes bad and fall over ips and server switch over. Not the simplest redundant solution. So here it is
2 NAS's holding the vhds for xen redundant data
2+ servers running xen (or whichever) hypervisor
then configure xen (i am using Citrix Xenserver)
install iredmail into a virtual machine
after everything is setup correctly
create a copy and duplicate of it
have xen do things like restart server or migrate hardware or start the duplicate of it when the initial goes down.
have your maildirs not stored locally but over nfs or sshfs.

3 (edited by mpaska 2010-08-05 14:59:20)

Re: iredmail multiserver install

I'm doing this, albeit I choose iRedMail as a base install on a test server to give us a leg up on not having to create our own ldap schema in-house.

iRedMail in a nutshell is just Dovecot (IMAP/POP3) server + Postfix, and a few other services. If you can load balance those services, then you can load balance iRedMail.

I'm not going to go in-depth how to do this, as I don't have much time. There's a few things to keep in mind, you need a proper load balancer or you need to imitate one to do things "correctly". I say "correctly" because you can likely get away with poor-mans roundrobin DNS or something, but at the end of the day having a proper load balancer is the "right way" to do things as it's important that Dovecot does not write to the same file on your share storage, which in my case our hardware balancer solves in that it will ensure for the life of an active IMAP session the user only goes to Server XYZ.

Once you solve that issue, everything else is a peice of cake. Just do some research into load balancing Postfix and Dovecot and some shared storage (I've got a SAN, but I see no reason NFS couldn't work - I believe Dovecot is NFS aware out of the box with some config options to be mindful of) then just ensure no single service is writing to the same file.

If you're using LDAP backend, then you essentially have your config in a very easy format to replicate between multiple servers. Do some research into setting up OpenLDAP to perform some provider/consumer replication. So your ldap master (provider) sits on Server ABC, and Servers XYZ and 123 replicate (consume) via the master. In the case that your master goes down, things will continue along fine and you can even promote a replica to be a master.

Without putting too much thought into it, if you had a NFS (with file locking) share mounted on a few servers. Installed iRedMail on each server and configured it to use the NFS mount for mail storage, then on your "consumer" servers just re-configure OpenLDAP to be a consumer of the master and I would imagine it would "work".

That should give you a start!

4

Re: iredmail multiserver install

Hi mpaska.

I'm wondering whether you have time to lead a load balance solution with iRedMail, i don't have enough time to do this, although i'm familiar with fail-over and load-balance.

5

Re: iredmail multiserver install

I'm in the process of bringing up multiple servers using shared storage (NFS) and MySQL database. I'm wondering if others have worked out the solution for load balancing other than round robin DNS.

Has anyone tried HAProxy or Pen with VRRP?

6 (edited by conheotiensinh1983 2010-09-21 09:26:29)

Re: iredmail multiserver install

Hi  AFAIK

For Load balance you can use Pen you can prefer:http://conheotiensinh.blogspot.com/2009 … -vrrp.html or Haproxy(http://conheotiensinh.blogspot.com/2010 … yer-7.html or http://conheotiensinh.blogspot.com/2010 … load.html).But With me Haproxy is best solution in Linux Because Haproxy support load balance layer 7(performance better than Pen) and  Pen only support layer 4 .So if you  use Pen you can't logon Webmail.

7

Re: iredmail multiserver install

Thanks for the links conheotiensinh1983. I'll let you know how it works out.

8

Re: iredmail multiserver install

What if i sync the mysql with active/active replica and  place the maildir path on an NFS share?
After that i'll place an HAproxy for http/pop/smtp/imap services
that should work.. what did you think?

9

Re: iredmail multiserver install

koma wrote:

What if i sync the mysql with active/active replica and  place the maildir path on an NFS share?
After that i'll place an HAproxy for http/pop/smtp/imap services
that should work.. what did you think?

Yes, it should work.

You can also try to move mysql database directory to share storage instead of active/active replication.