Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3788

Support for HAProxy Proxy Protocol

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.8.0
    • protocols
    • None

    Description

      As proposed in the gitter channel I would like to add support for HAProxy's PROXY protocol (https://www.haproxy.org/download/2.7/doc/proxy-protocol.txt).

      This allows to run James behind HAProxy (i.e. load balancing multiple James instances). In order to properly support the proxy protocol James needs to parse the provided PROXY arguments from HAProxy (remote ip address, remote port etc.) and store it in the SMTPSession for further processing (e.g. DNSRBL check, Authorized Networks etc.). Otherwise James uses HAProxy's address (e.g. localhost) as remote address.

      For instance, HAProxy sends following line after connecting:

      "PROXY TCP4 255.255.255.255 255.255.255.255 65535 65535\r\n" 

      Netty already provides a codec for HAProxy's protocol (io.netty.handler.codec.haproxy), so this can be implemented in the transport layer of James.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ouvtam ouvtam
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 50m
                  3h 50m