haproxy config manual update for multiple ports
dovecot at ptld.com
dovecot at ptld.com
Thu Oct 7 16:36:43 EEST 2021
> 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
More information about the dovecot
mailing list