Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to configure Haproxy for outgoing mails load balancing on my centos 5.6 vps server. for this i have installed postfix on load balancer. My postfix sasl configuration as follows to use Haproxy and sasl authentication.

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated        reject_unauth_destination
data_directory = /var/lib/postfix
inet_protocols = ipv4
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtpd_upstream_proxy_protocol = haproxy
smtpd_upstream_proxy_timeout = 50s

My /etc/postfix/master.cf file contains

smtp inet n - n - - smtpd -o smtpd_sasl_auth_enable=yes

My /etc/haproxy.cfg file configuration

    global   

    log 127.0.0.1   local0
    log 127.0.0.1   local1 notice

    Defaults

    mode tcp
    timeout connect 5000ms
    timeout client 50000ms
    timeout server 50000ms

    listen smtp_proxy

    bind 0.0.0.0:10021
    mode tcp
    option tcplog
    option smtpchk HELO lbsmtp.org
    balance roundrobin
    server mail1.lbsmtp.org x.x.x.x:25 send-proxy check
    server mail2.lbsmtp.org x.x.x.x:25 send-proxy check 

When relay mails from load balancer it postfix does not deliver mails to node. log file /var/log/maillog

    Sep 11 16:01:45 r22 postfix/smtpd[24023]: warning: haproxy read: timeout error
    Sep 11 16:01:45 r22 postfix/smtpd[24023]: connect from unknown[unknown]
    Sep 11 16:01:45 r22 postfix/smtpd[24023]: disconnect from unknown[unknown]
    Sep 11 16:01:47 r22 postfix/smtpd[24023]: warning: haproxy read: timeout error
    Sep 11 16:01:47 r22 postfix/smtpd[24023]: connect from unknown[unknown]
    Sep 11 16:01:47 r22 postfix/smtpd[24023]: disconnect from unknown[unknown]

And the log file of client node mail1.lbsmtp.org /var/log/maillog

    Sep 11 15:35:47 r23 postfix/smtpd[24073]: warning: hostname unassigned.psychz.net does not resolve to address 199.83.95.70: Name or service not known
    Sep 11 15:35:47 r23 postfix/smtpd[24073]: connect from unknown[199.83.95.70]
    Sep 11 15:35:47 r23 postfix/smtpd[24073]: lost connection after HELO from unknown[199.83.95.70]
    Sep 11 15:35:47 r23 postfix/smtpd[24073]: disconnect from unknown[199.83.95.70]
    Sep 11 15:35:49 r23 postfix/smtpd[24073]: warning: hostname unassigned.psychz.net does not resolve to address 199.83.95.70: Name or service not known
    Sep 11 15:35:49 r23 postfix/smtpd[24073]: connect from unknown[199.83.95.70]
    Sep 11 15:35:49 r23 postfix/smtpd[24073]: lost connection after HELO from unknown[199.83.95.70]
    Sep 11 15:35:49 r23 postfix/smtpd[24073]: disconnect from unknown[199.83.95.70]

can any body suggest me why client node not receiving mails from load balancer.? Is somewhere i have misconfigured ?

share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.