mailin icon indicating copy to clipboard operation
mailin copied to clipboard

HAPROXY and send-proxy parameter

Open timmeade opened this issue 10 years ago • 1 comments

We setup a simple test for maillin and everything looks fantastic so far except for a proxy test.

using one of the latest haproxy setups, we wanted to test proxying the node servers running mailin.

With the send-proxy command turned on for the server, mailin crashes instantly with the checks.

server smtp-work 10.1.1.140:2525 check send-proxy

error: Error: write EPIPE at Object.exports._errnoException (util.js:856:11) at exports._exceptionWithHostPort (util.js:879:20) at WriteWrap.afterWrite (net.js:763:14) events.js:146 throw err; ^

Error: Uncaught, unspecified "error" event. ([object Object]) at emit (events.js:144:17)

Any ideas or thoughts? We need to proxy the IP of the actual sender through the haproxy.

Thanks

timmeade avatar Mar 01 '16 19:03 timmeade

@TimMeade I'm not familiar with haproxy in particular and tcp proxying in general. How does the send-proxy protocol forwards the sender IP? Usually, EPIPE errors arise when the server on one end closes the connection. Would it be possible that haproxy closes the connection too early?

Flolagale avatar Mar 01 '16 20:03 Flolagale