haproxy config manual update for multiple ports
https://wiki2.dovecot.org/HAProxy
Maybe update this to having multiple ports (if this is even possible)
frontend ft_imap bind :110 << bind :143 mode tcp default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com:10143 send-proxy-v2 <<< how to put more ports here?
Why not just have multiple frontend cponfigs?
Aki
On 07/10/2021 12:51 Marc marc@f1-outsourcing.eu wrote:
https://wiki2.dovecot.org/HAProxy
Maybe update this to having multiple ports (if this is even possible)
frontend ft_imap bind :110 << bind :143 mode tcp default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com:10143 send-proxy-v2 <<< how to put more ports here?
On 10-07-2021 5:51 am, Marc wrote:
Maybe update this to having multiple ports (if this is even possible)
frontend ft_imap bind :110 << bind :143 mode tcp default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com:10143 send-proxy-v2 <<< how to put more ports here?
If you are using the same port on the backend server (I see in your case you are not, 10143) you can leave the port off and it will work for multiple ports using the port the traffic came in on. For example...
frontend imap bind xxx.xxx.xxx.xxx:110 bind xxx.xxx.xxx.xxx:143 bind xxx.xxx.xxx.xxx:993 bind xxx.xxx.xxx.xxx:995 bind [xxx:xxx:xxx:xxx:xxx:xxx:xxx:xxx]:110 bind [xxx:xxx:xxx:xxx:xxx:xxx:xxx:xxx]:143 bind [xxx:xxx:xxx:xxx:xxx:xxx:xxx:xxx]:993 bind [xxx:xxx:xxx:xxx:xxx:xxx:xxx:xxx]:995 default_backend imap_servers
backend imap_servers balance leastconn stick on src table single_imap_table default-server send-proxy-v2 check port 143 server mx-d884 mx-d884.example.com
would you mind updating the haproxy config on https://wiki2.dovecot.org/HAProxy
now you have the normal ports without proxy protocol and high ports with proxy, easier with testing.
frontend ft_imap bind :143 bind :993 mode tcp tcp-request connection set-dst-port dst_port,add(10000) default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com:10143 send-proxy-v2
-----Original Message----- From: Marc Sent: Thursday, 7 October 2021 11:51 To: 'dovecot@dovecot.org' dovecot@dovecot.org Subject: haproxy config manual update for multiple ports
https://wiki2.dovecot.org/HAProxy
Maybe update this to having multiple ports (if this is even possible)
frontend ft_imap bind :110 << bind :143 mode tcp default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com:10143 send-proxy-v2 <<< how to put more ports here?
frontend ft_imap bind :143 bind :993 mode tcp tcp-request connection set-dst-port dst_port,add(10000) default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com send-proxy-v2
-----Original Message----- From: dovecot dovecot-bounces@dovecot.org On Behalf Of Marc Sent: Saturday, 9 October 2021 12:54 To: dovecot@dovecot.org Cc: Siavash Tavakoli siavash.tavakoli@open-xchange.com; Aki Tuomi aki.tuomi@open-xchange.com Subject: RE: haproxy config manual update for multiple ports
would you mind updating the haproxy config on https://wiki2.dovecot.org/HAProxy
now you have the normal ports without proxy protocol and high ports with proxy, easier with testing.
frontend ft_imap bind :143 bind :993 mode tcp tcp-request connection set-dst-port dst_port,add(10000) default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com:10143 send-proxy-v2
-----Original Message----- From: Marc Sent: Thursday, 7 October 2021 11:51 To: 'dovecot@dovecot.org' dovecot@dovecot.org Subject: haproxy config manual update for multiple ports
https://wiki2.dovecot.org/HAProxy
Maybe update this to having multiple ports (if this is even possible)
frontend ft_imap bind :110 << bind :143 mode tcp default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com:10143 send-proxy-v2 <<< how to put more ports here?
The page really should be migrated into doc.dovecot.org, instead of updated on the wiki.
Aki
On 09/10/2021 13:56 Marc marc@f1-outsourcing.eu wrote:
frontend ft_imap bind :143 bind :993 mode tcp tcp-request connection set-dst-port dst_port,add(10000) default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com send-proxy-v2
-----Original Message----- From: dovecot dovecot-bounces@dovecot.org On Behalf Of Marc Sent: Saturday, 9 October 2021 12:54 To: dovecot@dovecot.org Cc: Siavash Tavakoli siavash.tavakoli@open-xchange.com; Aki Tuomi aki.tuomi@open-xchange.com Subject: RE: haproxy config manual update for multiple ports
would you mind updating the haproxy config on https://wiki2.dovecot.org/HAProxy
now you have the normal ports without proxy protocol and high ports with proxy, easier with testing.
frontend ft_imap bind :143 bind :993 mode tcp tcp-request connection set-dst-port dst_port,add(10000) default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com:10143 send-proxy-v2
-----Original Message----- From: Marc Sent: Thursday, 7 October 2021 11:51 To: 'dovecot@dovecot.org' dovecot@dovecot.org Subject: haproxy config manual update for multiple ports
https://wiki2.dovecot.org/HAProxy
Maybe update this to having multiple ports (if this is even possible)
frontend ft_imap bind :110 << bind :143 mode tcp default_backend bk_imap
backend bk_imap mode tcp balance leastconn stick store-request src stick-table type ip size 200k expire 30m server s1 backend.example.com:10143 send-proxy-v2 <<< how to put more ports here?
participants (3)
-
Aki Tuomi
-
dovecot@ptld.com
-
Marc