I've been doing ha-proxy setups with apache and spamassassin for a while and co-maintained some exim (oops, I used the 'e' word ;-) based mail servers also.
On Fri, Nov 27, 2009 at 01:21:13PM +0530, Manoj Burande wrote: > I am trying to setup a Postfix Mail Server on Fedora10. I am trying > to learn the basic process of setting up and manage a Postfix Mail > Server. Also trying to build a High-Available Postfix Mail Server > set. I have already configured HA Proxy load balancer servers. I just > wanted to place my two postfix mail server behind it. First of all I'd like to ask you if you took into account that esp. email (smtp) has intrinsic features providing service failover and simple load balancing machanisms. If you have two mailservers and can give them two differnet IP addresses you might want to set just two MX records inside your DNS zone file like this: mydomain.tld IN MX 10 mailserver1.mydomain.tld. mydomain.tld IN MX 10 mailserver2.mydomain.tld. Taking into account that the sending mta will take one or the other host and would give the other one a try if the first one fails, you might already get wat you want. In the case this would not solve your problem let's go into detail. An MTA's work can be divided into several tasks: - reception of an smtp delivery - mail evaluation (filtering, scoring) - mail routing - mail delivery - local - remote Each of this has different requirements concerning system resources and environment. - reception of an smtp delivery nothing special regarding load balancing: listen on port 25/tcp, talk (e)smtp concerning rcpt verification you have to make sure both servers have a copy of the user and alias data. - mail evaluation (filtering, scoring) nothing special either. Just make sure the rule sets are the same on each system. A Bayes filter may require some attention on how you handle the Bayes database: you could just have every system have it's own, relying on statistical effects to hold them in equivalent state, simply replicate one of them to the other system the hard way (cron, rsync) or use a shared storage like spamassassin with mysql. - mail routing also nothing special. Just keep information in sync. - remote mail delivery also nothing special. Just keep information in sync. Maybe you need a source NAT gateway if you can't provide each system with its own publicly visible ip address. Up to here it would be straight forward. But ... - local mail delivery if you plan to put your email onto disk (local mailspool, pop, imap, ...) here, you will face a problem: every host writes on its own disk so the user would have to check on both systems for his mail - bad idea. This could be solved by - a shared storage: NFS Server, NAS, Database (DBMail) - additional dedicated IMAP or POP Server Please keep in mind that for high availability you would have to get the shared storage as well redundant (e.g. Linux w. DRBD, MySQL cluster) as the load balancer itself (e.g. heartbeat). HTH, Chris -- Christian Recktenwald postfix-users-d...@citecs.de