Hello,

I am using v2.11.6 on CentOS 5 (and 6 and 7), without postscreen (it's a final destination server, not accepting mail from the Internet).

I have tried enabling the proxy protocol to make postfix log correctly user data when connections arrive from our haproxy proxy (currently in test mode).

So, I added (in main.cf) the directive:

   smtpd_upstream_proxy_protocol = haproxy

and I expected that things would continue as they normally do, except when a connection originates from our haproxy server (which lies on a different network), in which case postfix would log the client IP Address rather than the proxy's address.

But as soon as I reloaded postfix (after the above change), postfix stopped accepting normal connections:

Aug 19 17:13:54 vmail postfix/postfix-script[24279]: refreshing the Postfix mail system Aug 19 17:13:55 vmail postfix/master[22272]: reload -- version 2.11.6, configuration /etc/postfix Aug 19 17:14:09 vmail postfix/smtpd[24327]: warning: haproxy read: timeout error
Aug 19 17:14:09 vmail postfix/smtpd[24327]: connect from unknown[unknown]
Aug 19 17:14:09 vmail postfix/smtpd[24327]: disconnect from unknown[unknown]
Aug 19 17:14:12 vmail postfix/smtpd[24330]: warning: haproxy read: timeout error
Aug 19 17:14:12 vmail postfix/smtpd[24330]: connect from unknown[unknown]
Aug 19 17:14:12 vmail postfix/smtpd[24330]: disconnect from unknown[unknown]
...

If I understand right, it seems as if postfix is trying to read from a haproxy each and every time, whereas in fact it should do so only when a connection originates from a haproxy proxy.

Am I doing something wrong? Should I configure things differently?

Please advise.

Thanks in advance,
Nick

Reply via email to