Re: [exim] question about clustering exim

Top Page
Delete this message
Reply to this message
Author: Michael Da Silva Pereira
Date:  
To: Mize, Donald
CC: exim-users@exim.org
Subject: Re: [exim] question about clustering exim
Hi,

I've done something very similar. I've attached a diagram of how my
structure looks.

Basically I use ipvsadm to distribute the SMTP,POP3,IMAP,HTTP connections in
a round robin order to mail1-9. (this is done on mailwall)
Running on mail1-9 I made a .c app to accept pop3 and validate which "mail
store" server the mailbox exists on. (courier can do this, they call it
proxying I think)

I then have a pop3/imap service running on the "mail store" servers, this is
the actual home for users mailboxes (using courier).

So mail comes into mail1-9 gets spam scanned, virus checked, etc... then I
use a SQL database and field to determine which server the mailbox lives on
(modified couriers default table, just added a field). Using a router I
deliver the mail to the "mail store" server, which also runs a simpler
version of exim (no acl/scanning) which then delievers is to the mailbox
directory.

This is the router:
# Routing Method 2-1 - Local mailbox (deliver via SMTP)
routingmethod21:
       driver          = accept
       condition       = ${if eq{${lookup mysql {SELECT COUNT(*) FROM
`courier`.`mailboxes` WHERE `user` =
'${quote_mysql:$local_part}@${quote_mysql:$domain}'
AND `primary_mailserver` != '' LIMIT 1}}}{1}{yes}{no}}
       transport       = localmailbox_smtp_delivery


This is the transport:
        localmailbox_smtp_delivery:
                driver          = smtp
                allow_localhost = yes
                connection_max_messages = 10
                hosts           = ${lookup mysql {SELECT
`primary_mailserver` FROM `courier`.`mailboxes` WHERE `user` =
'${quote_mysql:$local_part}@${quote_mysql:$domain}' AND `primary_mailserver`
!= '' LIMIT 1}}
                max_rcpt        = 1


I did this method to avoid using a shared NFS of sort, so I basically split
my mailboxes over servers. Therefore if there is a failure I have 50% of my
mailboxes down (this will decrease as you add mail stores). The company I
work for can't afford to spend $$ on a big NAS with redundancy, etc... So I
went for the cheap hardware approach, but I've had some $$ to spend on a few
HP servers.

This setup handles a ton of mail, and was built to try eliminate a single
point of failure, it also does as you want and splits users from the same
domain over different servers.

Note: I use a combination of Freebsd and Linux, as I've noticed an increase
in performance using Freebsd. So I'm currently migrating the linux servers
to freebsd.

Thanks,
Michael

2009/5/11 Mize, Donald <donald.mize@???>

> Hi,
>
> I'm a very new user. I've already have exim 4.69 configured for local
> users. What I want to do is configure a cluster of exims..for a test bed.
> Basically I want to put half the users on one machine, half on the other,
> using one domain name. Are there any example config files to show me how to
> do this, or something close?
>
> Thanks!
> Don
> --
> ## List details at http://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>




--

Regards,
Michael da Silva Pereira
Mobile: +27 84 245 2376
Office: +27 11 251 2036