1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-08-10 22:31:47 +02:00

ports not in PORTS should not be bound

(cherry picked from commit b7dcf45267)
This commit is contained in:
Florent Daigniere
2024-06-22 09:38:49 +02:00
committed by Mergify
parent 8bd5d0f23d
commit 42b4dd2004
2 changed files with 4 additions and 12 deletions

View File

@@ -96,14 +96,12 @@ protocol imap {
} }
service imap-login { service imap-login {
{%- if PORT_143 %}
inet_listener imap { inet_listener imap {
port = 143 port = {% if PORT_143 %}143{% else %}0{% endif %}
{%- if PROXY_PROTOCOL_143 %} {%- if PROXY_PROTOCOL_143 %}
haproxy = yes haproxy = yes
{% endif %} {% endif %}
} }
{% endif %}
{%- if TLS_993 and PORT_993 %} {%- if TLS_993 and PORT_993 %}
inet_listener imaps { inet_listener imaps {
port = 993 port = 993
@@ -119,14 +117,12 @@ service imap-login {
} }
service pop3-login { service pop3-login {
{%- if PORT_110 %}
inet_listener pop3 { inet_listener pop3 {
port = 110 port = {% if PORT_110 %}110{% else %}0{% endif %}
{%- if PROXY_PROTOCOL_110 %} {%- if PROXY_PROTOCOL_110 %}
haproxy = yes haproxy = yes
{% endif %} {% endif %}
} }
{% endif %}
{%- if TLS_995 and PORT_995 %} {%- if TLS_995 and PORT_995 %}
inet_listener pop3s { inet_listener pop3s {
port = 995 port = 995
@@ -148,14 +144,9 @@ service lmtp {
service submission-login { service submission-login {
inet_listener submission { inet_listener submission {
{%- if PORT_587 %} port = {% if PORT_587 %}587{% else %}0{% endif %}
port = 587
{%- if PROXY_PROTOCOL_587 %} {%- if PROXY_PROTOCOL_587 %}
haproxy = yes haproxy = yes
{% endif %}
{%- else %}
# if the section is unset the port is bound anyways
port = 0
{% endif %} {% endif %}
} }
{%- if TLS_465 and PORT_465 %} {%- if TLS_465 and PORT_465 %}

View File

@@ -0,0 +1 @@
Ensure that ports that do not feature in PORTS are not bound