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 want to configure Haproxy for outgoing mail load balancing. my configuration file /etc/haproxy.cfg is.

        maxconn     4096 # Total Max Connections. This is dependent on ulimit
        nbproc      4 # Number of processing cores. Dual Dual-core Opteron is 4 cores for example.

        mode       tcp

listen smtp_proxy
        mode tcp
        option tcplog
        balance roundrobin # Load Balancing algorithm
        ## Define your servers to balance
        server 74.117.x.x:25  weight 1 maxconn 512 check
        server 199.71.x.x:25  weight 1 maxconn 512 check

And when i start service haproxy i get this error.

Starting HAproxy: [ALERT] 244/172148 (7354) : cannot bind socket for proxy smtp_proxy. Aborting.

Please tell me where i am doing will appreciated.

share|improve this question
up vote 1 down vote accepted

If you are getting bind errors, you need to check whether another process is already listening on the same port 25. You can use:

$ sudo netstat -lnp | grep 25

Another possibility is that you are running the process with insufficient privileges. Binding on ports under 1024 requires root privilege.

share|improve this answer
thank u khaled now my haproxy is running but now i want to know how i authenticate haproxy to relay mails from it's node and how i submit mails to haproxy either via php application or another postfix. – user128296 Sep 4 '12 at 7:36
@user128296: If you have something else to ask about, you can post a new question on this site if it is on-topic. – Khaled Sep 4 '12 at 7:41

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.