Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-09-2013, 01:46 PM   #1
Registered: Jan 2011
Location: Dhaka
Posts: 80

Rep: Reputation: 1
HA-Proxy and postfix


I'm using HA-proxy as frontend to load-balance between two backend postfix. I'm using a single postfix instance currently as test purpose.

HA-Proxy version: 1.5-dev19 2013/06/17
Postfix Version: 2.8.11
HA Proxy Config:

        log     global
        option  dontlognull
        retries 3
#       option redispatch
        maxconn 4000
        contimeout      50s
        clitimeout      50s
        srvtimeout      50s

frontend smtp_proxy
        mode tcp
        log global
        no option http-server-close
        timeout client 1m
        option tcplog
        default_backend bk_postfix

backend bk_postfix
        mode tcp
        log global
        no option http-server-close
#       option smtpchk EHLO mail.EXAMPLE.TEST
        option tcplog
        timeout server 1m
        timeout connect 40s
        #source usesrc clientip 
        server postfix send-proxy
In postfix's, I have the following lines:

smtpd_upstream_proxy_protocol = haproxy
smtpd_upstream_proxy_timeout = 50s
I'm getting the following error:

Jul  9 18:03:02 mail postfix/smtpd[2383]: connect from haproxy.EXAMPLE.TEST[]
Jul  9 18:03:03 mail postfix/smtpd[2383]: improper command pipelining after EHLO from haproxy.EXAMPLE.TEST[]
Jul  9 18:03:03 mail postfix/smtpd[2383]: 90B4B1603D7: client=haproxy.EXAMPLE.TEST[]
Jul  9 18:03:04 mail postfix/smtpd[2383]: lost connection after DATA (12 bytes) from haproxy.EXAMPLE.TEST[]
Jul  9 18:03:04 mail postfix/smtpd[2383]: disconnect from haproxy.EXAMPLE.TEST[]
I tried to send email from different domain, including gmail, yahoo etc. Same result. I tried different timeout value. But no luck. I googled a lot a tried suggested solutions.

What I'm missing here? Thanks for you help in advance.

Last edited by moyorakkhi; 07-09-2013 at 02:07 PM.
Old 07-10-2013, 05:00 AM   #2
Registered: Jan 2011
Location: Dhaka
Posts: 80

Original Poster
Rep: Reputation: 1
Got it resolved. Actually there was no problem with the configuration. It was the postfix version. Postfix version has to be 2.10.* or up.


haproxy, postfix

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to route postfix to use a proxy ? scout_game Linux - Software 9 02-27-2013 08:21 PM
Postfix (Exim?) as relay-only (aka proxy) cykelsmeden Linux - Server 0 01-31-2013 12:45 PM
Configuring Mail Proxy ( MTA Postfix ) antodeepak Linux - General 3 09-08-2006 06:44 AM
Postfix Mailserver connecting to ISPs SMTP-server via Proxy/Router saavik Linux - Networking 2 07-17-2006 01:05 AM
mail relay/proxy with postfix waskelton4 Linux - Software 2 09-07-2004 11:33 AM

All times are GMT -5. The time now is 02:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration