Search code examples
exchange-serverhaproxysonicwall

Configuring HA Proxy with exchange and SonicWall


I'm setting up a new HA Proxy server (first time encountering it) and have problems forwarding traffic

It's supposed to forward SMTP traffic to two SMTP relay servers, and to two exchange servers (IMAP)

Version is 1.8.8-1 on Ubuntu 18.04.1 server (HA proxy is the only thing that's installed)

SMTP and IMAP configuration is as follows

frontend SMTP
    bind 10.1.1.232:25 name smtp
    mode tcp
    option tcplog
    default_backend SMTP
frontend IMAP4
    bind 10.1.1.232:143 name imap
    mode tcp
    default_backend IMAP4
backend SMTP
    mode tcp
    server SWES 10.1.1.233:25 send-proxy check port 25
    server POSTFIX 10.1.1.234:25 send-proxy check port 25

backend IMAP4 mode tcp server Exc1 10.1.1.230:143 send-proxy check port 143 server Exc2 10.1.1.231:143 send-proxy check port 143

Thunderbird fails when connecting to both ports with errors: 'This mail server is not an imap mail server', and 'message could not be sent for an unknown reason'

Telneting to specified ports result in:

su@haproxy:/home$ telnet 10.1.1.232 25
Trying 10.1.1.232...
Connected to 10.1.1.232.
Escape character is '^]'.
220 mail.example.com ESMTP mail.example.com
502 5.5.1 Error: invalid command

and

su@haproxy:/home$ telnet 10.1.1.232 143
Trying 10.1.1.232...
Connected to 10.1.1.232.
Escape character is '^]'.
* OK The Microsoft Exchange IMAP4 service is ready.
PROXY BAD Command Error. 12

telneting directly to target hosts works without any errors

Does anyone have any ideas about those errors and how to fix them?

Thanks


Solution

  • Apparently send-proxy option isn't supported on nether Sonic Wall Email Security, or on Exchange. Haven't tested the option with Postfix, but according to documentation, Postfix works with said option.