[KLUG Members] Creating a mail server cluster

Adam bultman adamb at glaven.org
Wed Mar 15 17:49:07 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

agencies_ad1 at sancharnet.in wrote:

> Hello I currently have sendmail running together with a DNS server
> on my linux box. I can connect to my mail server using POP3 .
>
> The problem is I need an additional linux box running Suse with a
> backup mailserver and a second installation of BIND.
>
> I want users to see just one interface to the servers and I want
> the servers to back each other up. So if one dns/mailserver fails
> the other still supports the system.
>
> I know you can redirect mail from one server to another using the
> 'MAIL_HUB' and 'stickyhost' directive but it isn't clear that this
> will provide the clustering I need between the mail servers. It
> seems that mail simply gets passed from the first mail server to
> the second but with unmatched messages being relayed.
>
> Is there any standard documentation relating to this?
>
> Thanks!
>
> Regards,
>
> Komal
>
I'm sure Adam Williams will respond to this gloom and doom, but here's
what I'd suggest to get you going:

1. Look up the linux-HA project (http://www.linux-ha.org/). With linux
HA, you can (with software) create a cluster of systems that load
balance, allow failover, etc.
2. Look up another mail server (like qmail, cyrus, etc) that don't
require access to files in the same way that sendmail does.   
Sendmail uses one big file (unless it supports maildirs somehow?) that
cannot have two processes writing to the mailspool : the sendmail
process needs exclusive write access.  Maildirs allow you to have
multiple servers in a clustered environment without problems. (It
slows down backups, though)
3. See about setting up an NFS server to host the mail directories -
it's not as slow as you think, and it's pretty much required here if
you want them to 'back each other up'.  If your primary server dies,
your mail spools are gone unless there's some odd rsync process or
something going to the secondary server (and even then, you'd lose data).

There's at least one person doing this exact same thing and it works
fine. I got it working with mail-ldap, NFS, and linux-ha and had a
nice, good cluster working.  I lacked the horsepower for doing big
maildirs (8k+ messages) and the boss didn't want to do it, so I
petered out.

It IS doable, it IS workable, it IS sustainable, and anybody who tells
you different has a chip on his/her shoulder.

Bind9 is easy with a clustered environment. Just set up an rsync job
to make sure your backup is kept up to date, set up linux-ha, and
you're done.

Adam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEGJnikZb3NX+IDMsRAuUrAJ4zyqaUmKnuof0X0zo7ed0yvUNODACg+KQ7
AlhIw5Q8p91jjW86cC0of2M=
=+LpH
-----END PGP SIGNATURE-----



More information about the Members mailing list