Need help with mail server clustering

Bill Campbell linux-sxs at celestial.com
Wed Feb 4 09:18:15 PST 2009


On Wed, Feb 04, 2009, Yu Meng Chong wrote:
>Hi all, 

>Happy Chinese New Year! Hope everyone on this list is safe (and still
>safely in their jobs!)

>I need some advice on something -- this is a theoretical question (for
>now), but it has been bothering me for a while because of a problem I have
>been seeing in my little part of the world.

>In this scenario, I need to design a mail infrastructure solution that
>involves several mail servers. Outgoing mail will go through one single
>server. Incoming mail and user mail boxes will be spread over several
>servers (because each user wants extremely large storage, say 100GB) and we
>will be using IMAP. There is just one requirement:

>On user mail clients, they only need to specify one IMAP server (say,
>imap.company.com). The user does not need to know the actual server where
>his/her mailbox resides.

>Are there any write-ups about this kind of scenario that I can read? I have
>not been successful Googling, but it may be that I am not defining my
>search properly.

I have written up descriptions of our implementation of this type of
system, proably to this list.

We have a single MX server handling incoming mail to the cluster, and it
uses postfix, amavisd-new, and clamav only to eliminate virus and phishing
messages before passing them to a cluster of servers for delivery.
Delivery to the clusters is done using the postfix transports mechanism to
a hostname, mailin.example.com with multiple IPs using round-robin DNS for
load balancing (the clusters listen only on the private 192.168 LAN with no
public accessibility).  One, rather slow by today's standards, server
handles hundreds of thousands of deliveries a day with a load average
rarely above 1.00.

The cluster servers use openldap authentication with the user's $HOME
directories munged a bit to indicate which server hosts the user's data.
The cluster servers have these NFS mounted (automounting doesn't scale well
with 10s of thousands of users).

The cluster machines do spamassassin checking and delivery to the NFS
mounted Maildir mail stores, and can also handle POP3/IMAP.  The load for
spamassassin can be pretty high so one might want to use dedicated cluster
servers to handle IMAP if response is slow.

Users can access the IMAP servers using generic DNS like imap.example.com
which, like the mailin.example.com, provide multiple IPs via round robin so
they don't have to worry about specific servers.

We use courier-authlib and courier-imap because (a) they scale well with
large numbers of users, and (b) I much prefer real user's HOME directories
to things like Cyrus does as it provides much more flexibility in dealing
with files using standard *nix utilities.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186

When I hear a man applauded by the mob I always feel a pang of pity
for him.  All he has to do to be hissed is to live long enough.
    -- H.L. Mencken, Minority Report



More information about the Linux-users mailing list