Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 4 VPS servers, my plan is to use one of these VPS servers as a load balancer which sends mail received by it from another server to other 3 VPS (smtp) clients who will relay mail to the outside network.

The idea is:

        ->  VPS2
 VPS1   ->  VPS3
        ->  VPS4

I want Postfix to be used as an MTA in this configuration. Can anybody help me out in this?

All servers have CentOS 5 as their OS.

share|improve this question
up vote 1 down vote accepted

What kind of volume are we talking about here ?

One postfix machine with proper disk subsystem on modern hardware will easily do hundreds of messages per second.

One reason to use separate sending machines is to use different source IPs to increase throughput to the big email providers, but you provide no details about your intended usage of this setup.

share|improve this answer
The reason for my setup is to send 400000 mails per day and my vps servers fix a quota of the mails send so i can send only limited mails from a single postfix machine,thus by using many machines i can balance the load on a single machine to send mails. – achal tomar Apr 5 '12 at 9:56
If you're purely worried about sending emails, you could just have your sending application cycle through the three mail servers. Receiving bounce emails and responses doesn't count towards your limit does it? – Ladadadada Apr 5 '12 at 10:18
No i am only concerned about sending emails which are generated by a php script to the load balancing server. – achal tomar Apr 5 '12 at 10:28
If your VPS provider limts the messages you can send I strongly urge you to ditch them and find a better company. – adaptr Apr 5 '12 at 12:16

You can use haproxy in tcp mode to load balance SMTP requests to the other three VPS servers. However, you will have a single point of failure which is the load balancer. Anyway, you will have the needed load balancing functionality as long as the load balancer is alive.

share|improve this answer
Is there any other method to do this like changes in postfix file. – achal tomar Apr 5 '12 at 9:30
I am not aware of such a solution using only postfix. If you don't like the idea of installing a dedicated load balancing software, you can distribute the load using DNS-based load balancing. It is reasonable, but not very effective and does not recognize the failing node. – Khaled Apr 5 '12 at 9:37
ok i will try this and update you. – achal tomar Apr 5 '12 at 9:43
DNS-based load balancing is useful but how will i authenticate mails send from the 3 VPS servers if i use this. – achal tomar Apr 5 '12 at 9:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.