*As you told now i have turned off postscreen and using *
smtpd_upstream_proxy_protocol = haproxy
smtpd_upstream_proxy_timeout = 5s
 in my /etc/postfix/main.cf file


*
and in /etc/postfix/master.cf*
smtp    inet    n       -       n       -       -       smtpd -o
smtpd_sasl_auth_enable=yes
*
and my /etc/haproxy.cfg file looks like*

global
        maxconn     4096 # Total Max Connections. This is dependent on
ulimit
        daemon
        nbproc      4 # Number of processing cores. Dual Dual-core Opteron
is 4 cores for example.
        log 127.0.0.1 local4
defaults
        mode        tcp
        clitimeout  4s
        srvtimeout  4s

frontend smtp_proxy 0.0.0.0:10021
        mode tcp
        log global
        option tcplog
        default_backend bk_postfix
backend bk_postfix
        mode tcp
        log global
        option tcplog
        contimeout 3000
        srvtimeout 3000
        balance roundrobin  # here i am testing things only one node
        server r23.mtp.org 74.117.x.x:25 send-proxy


And Now i am submiting mails from another mail server on load balancer
using sasl authentication but now it not receiving mails
and When i submit mails to load balancer* /var/log/maillog showing *

Sep  8 13:09:47 r22 postfix/smtpd[3170]: connect from unknown[unknown]
Sep  8 13:09:47 r22 postfix/smtpd[3170]: disconnect from unknown[unknown]
Sep  8 13:09:53 r22 postfix/smtpd[3170]: warning: haproxy read: timeout error
Sep  8 13:09:53 r22 postfix/smtpd[3170]: connect from unknown[unknown]
Sep  8 13:09:53 r22 postfix/smtpd[3170]: disconnect from unknown[unknown]
Sep  8 13:09:58 r22 postfix/smtpd[3170]: warning: haproxy read: timeout error
Sep  8 13:09:58 r22 postfix/smtpd[3170]: connect from unknown[unknown]
Sep  8 13:09:58 r22 postfix/smtpd[3170]: disconnect from unknown[unknown]
Sep  8 13:10:04 r22 postfix/smtpd[3170]: warning: haproxy read: timeout error

now please tell me where i am doing mistake ..?




On Fri, Sep 7, 2012 at 10:12 PM, Wietse Venema <wie...@porcupine.org> wrote:

> Wietse:
> > Your first mistake is to use postscreen to submit mail from
> > an application.
>
> Naval saini:
> > Than please tell me how can i balance load of outgoing mails using
> haproxy
> > and what postfix program i should use to receive mails from php
> application
> > and balancing load using haproxy backhand servers.
>
> Turn off postscreen.
> http://www.postfix.org/POSTSCREEN_README.html#turnoff
>
> Turn on smtpd_upstream_proxy_protocol.
> http://www.postfix.org/postconf.5.html#smtpd_upstream_proxy_protocol
>
> > Does relayhost parameter play any role in haproxy like it plays in DNS
> load
> > balancing.
>
> Your problem is RECEIVING mail. relayhost is for SENDING mail.
> http://www.postfix.org/BASIC_CONFIGURATION_README.html
>
>         Wietse
>

Reply via email to