Haproxy: Transfer IP Client SMTP to Exchange 2013

How to make Haproxy transmit IP customers who send mail via SMTP server CAS?

Config smtp (lab)

frontend fe_ex2013_smtp
mode tcp
bind 10.1.100.60:25
default_backend be_ex2013_smtp

backend be_ex2013_smtp
mode tcp
no option http-server-close
balance roundrobin
option log-health-checks
option smtpchk EHLO haproxy.check
server CAS-01 10.1.100.105:25 send-proxy check
server CAS-02 10.1.100.106:25 send-proxy check

backend be_ex2013
mode http
balance roundrobin
server CAS-01 10.1.100.105:443 check ssl inter 15s verify required ca-file /etc/ssl/contoso.crt
server CAS-02 10.1.100.106:443 check ssl inter 15s verify required ca-file /etc/ssl/contoso.crt

Who can help ? Also in haproxy log present error 401 Unauthorized

The only real way would be switching to a 2 arm config and using tproxy as described here: http://www.loadbalancer.org/eu/blog/configure-haproxy-with-tproxy-kernel-for-full-transparent-proxy

You can almost certainly ignore the bits about compiling it into iptables and the Kernel as it’s been in there for ages now in most systems I’ve used.

TPROXY for Linux… I use FreeBSD, how to configure transporter proxy?

I must confess I’m not much of a FreeBSD man so not the best person to help here.

However searching google did yield some results talking about it which seem positive : http://www.serverphorums.com/read.php?10,691956