From: Daniel L'Hommedieu on
On Nov 18, 2009, at 09:22, Dhiraj Chatpar wrote:
> We have 5 different servers.. all of them are mailing servers for our main company domain, I wish to Balance the mails across these 5 servers.
>
>
> Ogden Nash - "The trouble with a kitten is that when it grows up, it's always a cat."
>
> On Wed, Nov 18, 2009 at 19:34, Wietse Venema <wietse(a)porcupine.org> wrote:
> Dhiraj Chatpar:
> > Hi,
> >
> > I am looking for a solution where i would be able to configure one postfix
> > instance in such a way that it rotates multiple relayhosts and acts as a
> > host that relays emails to multiple hosts. For eg. we currently have the
> > option of entering just one relayhost = xx.xx.xx.xx. However i need a
> > solution where i shuld be able to map multiple relayhosts and make postfix
> > relay via those list of hosts.
>
> What problem are you trying to solve? State the problem, not
> the solution of multiple relayhosts and ports.
>
> Wietse
>

Dhiraj,

If you wish to balance the load across a number of servers, then you need a load balancer. If you can't afford one of those or do not wish to employ one of those, the poor man's way to do basic load balancing is to use round-robin DNS, as was already mentioned.

Daniel
From: Wietse Venema on
Dhiraj Chatpar:
> We have 5 different servers.. all of them are mailing servers for our main
> company domain, I wish to Balance the mails across these 5 servers.

Isn't that what the DNS was invented for? You specify the domain
and its servers, and then all standards-compliant mail systems
will distribute the load according to MX preferences.

Wietse

From: Dhiraj Chatpar on
Yes the DNS is a good idea..

However what will i achieve if i implement the following?


# Changes in /etc/postfix2/main.cf
sender_based_routing = yes


relay unix - - n - - smtp
-o fallback_relay=
smtp_act1 unix - - n - - smtp
-o smtp_sasl_password_maps=hash:/etc/postfix2/sasl_passwd_act1
smtp_act2 unix - - n - - smtp
-o smtp_sasl_password_maps=hash:/etc/postfix2/sasl_passwd_act2
smtp_act3 unix - - n - - smtp
-o smtp_sasl_password_maps=hash:/etc/postfix2/sasl_passwd_act3
smtp_act4 unix - - n - - smtp
-o smtp_sasl_password_maps=hash:/etc/postfix2/sasl_passwd_act4



#/etc/postfix2/sasl_passwd_act1

domainname.com



Mike Ditka <http://www.brainyquote.com/quotes/authors/m/mike_ditka.html> -
"If God had wanted man to play soccer, he wouldn't have given us arms."

On Wed, Nov 18, 2009 at 20:10, Wietse Venema <wietse(a)porcupine.org> wrote:

> Dhiraj Chatpar:
> > We have 5 different servers.. all of them are mailing servers for our
> main
> > company domain, I wish to Balance the mails across these 5 servers.
>
> Isn't that what the DNS was invented for? You specify the domain
> and its servers, and then all standards-compliant mail systems
> will distribute the load according to MX preferences.
>
> Wietse
>
From: Wietse Venema on
Dhiraj Chatpar:
> Yes the DNS is a good idea..
>
> However what will i achieve if i implement the following?

The solution is to have multiple MX records in the DNS.

All standards-compliant MTAs will spread the load WITHOUT
ANY SENDER SIDE CONFIGURATION.

Wietse