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 want to load balance outbound emails between 3 post-fix gateways for sending mails only reason is to use multiple different source IPs to increase throughput & inbox delivery. Each gateway should receive an approximately equal amount of outbound messages.

How is it possible please suggest.

                    +----------> smtp A ---------> Internet
clients --------> smtp lb -----> smtp B ---------> Internet
                    +----------> smtp C ---------> Internet
share|improve this question
up vote 4 down vote accepted

One wonders what it is you are doing.

Nonetheless, the typical way to do this is by using round robin DNS for your SMTP server (define multiple A records for some DNS name, and specify that as the outbound SMTP server on whatever is originating emails, like an email client).

You could also make a load balancer out of another postfix server, because SMTP servers normally send emails to each other for forwarding. You should be able to do this simply by setting up multiple forwarders for it. If your emails are coming from a single source which caches DNS replies, this would be the more likely solution.

The way you do this is a bit of a hack: you set up a local DNS name which you configure as the relayhost in Then, for that DNS name, configure multiple MX records with the same priority:

smtp-out IN MX 10
smtp-out IN MX 10 IN A IN A
share|improve this answer
Hi, Falcon I am the newbiee can you suggest how to use round robin dns for smtp. I have already multiple A records for the server as,, – user103373 Oct 19 '12 at 5:27
You use RR DNS by putting multiple A records for the same DNS name. You can set up another name and specify "somename IN A x.x.x.x" multiple times, changing x.x.x.x to each different IP. – Falcon Momot Oct 19 '12 at 5:29
this solution works for me thanks @falcon – user103373 Oct 20 '12 at 6:47

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.