Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm in the process of configuring an email platform and I would like to clear some doubts that I have.

When building this system I have 2 options:

  1. Have PHP doing the connections to my SMTP external server (it's a delivery only server). This is how my network is configured at the moment and I feel it's very heavy on the server.
  2. Have PHP connecting to my local MTA and having the local MTA (postfix) connecting through SMTP to my external delivery server

I think the option 2 is the preferable one for a couple of reasons:

  • Dispatch from the email platform is faster
  • PHP processes will finish faster
  • Delivery itself will be on postfix (local MTA) responsibility thus creating a new layer on the delivery dataflow providing a lot more abstraction on the PHP platform
  • Delivery rules can be defined specifically on Postfix

So, question 1 is if this is the preferable solution or if I should keep option 1?

Bellow is a small representation of what I'm referring in point 2:

                                                                  |            |
                              +---> smtp external backend a ----->|            |
                              |                                   |            |
platform -------> local MTA lb ---> smtp external backend b ----->|  Delivery  |
                              |                                   |            |
                              +---> smtp external backend c ----->|            |
                                                                  |            |

Question 2:

If this is the preferable situation how can I create a load balance postfix solution?

I need to be able to easily add and remove smtp servers.

Thank you!

share|improve this question
up vote 4 down vote accepted

First. Two questions in one is bad!

1) As you didn't find negative arguments for option 2 you should choose option 2.

2) You need no Postfix load balancer. Postfix on a recent machine is able to deliver 100 mails per second. With good hard-drives and a bit of queue management even more. I don't know why to extend that? And if you really really really need it then you should have an in-house DNS server with low TTL and use multiple A records for your local MTA (1b). The DNS is then doing round-robin load balancing for you.

share|improve this answer
Thank you mailq. Sorry about the 2 questions, I felt they were closely related. I'm going to investigate a bit more on the DNS round-robin as it really appears to be the best solution for what I want. – José P. Airosa Oct 7 '11 at 13:19

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.