Brief notes on this ISP Qmail/Vpopmail Cluster design
- Load balancing is done via round-robin dns. This allows for easy
scaling of the cluster. You can add/remove additional machines as
needed. Also, you won't need expensive hardware load balancers, just
a couple of cheap linux servers running tinydns.
To take full advantage of dns load balancing (in regards to scaling), your
clients should be configured to look at different hostnames for incoming
and outgoing mail servers. For this example, you could use "mail" for the
incoming server, and "smtp" for outgoing server. If this is not possible,
you could setup port forwarding at the router to segregate incoming and
outgoing mail. But this will not scale as well, unless you invest in a
hardware load balancer.
- MX machines (spam scanners):
- qmail-queue (for spam assassin site-wide, virus scanning)
- chkuser (check for valid vpopmail user, other envelope checking)
- spam throttle
- big concurrency
- smtp-auth (only needed if you cannot limit smtp access via IP)
- spam throttle
All except SMTP will have "nameserver 127.0.0.1" in their resolv.conf
files. Each machine will have dnscache running on localhost that will
simply forward queries to SMTP. SMTP will then perform the lookup, and the
stub resolver will cache it. SMTP will have the IP of its private network
address in resolv.conf, rather than running an additional dnscache on
localhost. This not only provides a network wide (well, cluster wide)
dns cache, but also cuts down on intranet dns traffic. NOTE, you will want
to install the round-robin dnscache patch to dnscache.
All NFS machines should probably not run linux, but something with better
NFS performance like FreeBSD.
The NFS server will share the vpopmail home directory, and qmail's control
and users directories. In control, the "me" file will just be a link to
"/etc/me". This way, all NFS machines will have the same qmail/vpopmail
data except for the "me" file.
By Bill Shupp, with some ideas from Gary Houle and Jason Wade, and also
Michael Boman. Caching ideas come from Matt Simerson.