LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 1
HA-Proxy and postfix


Hi,

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.

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

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

frontend smtp_proxy 0.0.0.0:25
        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 0.0.0.0 usesrc clientip 
        server postfix 10.100.0.137:25 send-proxy
In postfix's main.cf, I have the following lines:

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

Code:
Jul  9 18:03:02 mail postfix/smtpd[2383]: connect from haproxy.EXAMPLE.TEST[10.100.0.213]
Jul  9 18:03:03 mail postfix/smtpd[2383]: improper command pipelining after EHLO from haproxy.EXAMPLE.TEST[10.100.0.213]
Jul  9 18:03:03 mail postfix/smtpd[2383]: 90B4B1603D7: client=haproxy.EXAMPLE.TEST[10.100.0.213]
Jul  9 18:03:04 mail postfix/smtpd[2383]: lost connection after DATA (12 bytes) from haproxy.EXAMPLE.TEST[10.100.0.213]
Jul  9 18:03:04 mail postfix/smtpd[2383]: disconnect from haproxy.EXAMPLE.TEST[10.100.0.213]
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 03:07 PM.
 
Old 07-10-2013, 06:00 AM   #2
moyorakkhi
Member
 
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.
 
  


Reply

Tags
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 09:21 PM
Postfix (Exim?) as relay-only (aka proxy) cykelsmeden Linux - Server 0 01-31-2013 01:45 PM
Configuring Mail Proxy ( MTA Postfix ) antodeepak Linux - General 3 09-08-2006 07:44 AM
Postfix Mailserver connecting to ISPs SMTP-server via Proxy/Router saavik Linux - Networking 2 07-17-2006 02:05 AM
mail relay/proxy with postfix waskelton4 Linux - Software 2 09-07-2004 12:33 PM


All times are GMT -5. The time now is 08:51 AM.

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