From: Stefan =?utf-8?Q?F=C3=B6rster?= on
* Manoj Burande <manoj.burande(a)artificialmachines.com>:
> 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.

Trying to learn Postfix by implementing a HA solution is not really a
suitable way, IMHO. In case nobody else is going to post those links:

http://www.postfix.org/BASIC_CONFIGURATION_README.html
http://www.postfix.org/STANDARD_CONFIGURATION_README.html

Perhaps you might want to set up a standard Postfix mailserver before
you work on an HA setup.

> 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.
>
> Is there ANYBODY help me to accomplish the same. Or please provide me
> online stuff to set up mail servers behind load balancer.

The way the SMTP protocl is designe, load balancers are almost always
unnecessary - even HA loadbalancers might reduce availability (if your
only MX entry points to the LB and the receiving Postfix server dies
mid-transaction).

What you want to look at when talking about a HA setup is the
availability to continuously process a mail queue even if one node
dies. You should have a very good reason to invest in such a setup,
for example, sending out large newsletters. If your mailservers
typically run with very small queues and a loss/delay of a single mail
is not a big deal, simply configure two mail servers (and make your
IMAP server/$WHATEVER clustered).

If you absolutely need to make sure that queued mails will be
processed even if the node that "owned" the queue dies, then - and
only then - try to setup a cluster.

So, a quick list of things you should get accomplished:

1. Get a HA storage solution. If e.g. it is some SAN/iSCSI stuff, get it
connected to you two nodes and configure a cluster filesystem (someone
might comment on why a queue on NFS is not a good idea).
Whatever you do, make sure both nodes can access the same filesystem.
2. Get a clustering software working and installed on your nodes.
Pacemaker/Corosync should do the job.
3. Configure two Postfix instances, each with it's own queue
directory. If you don't want to store it's binaries/configuration
files on the clustered filesystem, figure out a way to keep them in
sync on both nodes.
4. Write yourself a resource agent which is capable of stopping and
starting an instance.
5. In your clustering software, configure a "mailserver" resource
using the resource agents from the previous step, and add other
cluster resources (stonith devices, virtual IP addresses) as needed.

Once you are finished, when one of your nodes dies, the Postfix
instance will be started on the remaining node. Since the queue
directory will still be available (clustered filesystem, you
remember?), processing of the queue will continue.

All of this of course doesn't guarantee your users will have access to
your mails - you'll basically need to repeat the above steps for your
IMAP/POP3 server.


Ciao
Stefan
--
Stefan Förster http://www.incertum.net/ Public Key: 0xBBE2A9E9
Tapferkeit ist ein Anfall, der bei den meisten Menschen schnell vorübergeht.