1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-01-30 04:30:49 +02:00

ports not in PORTS should not be bound

This commit is contained in:
Florent Daigniere 2024-06-22 09:38:49 +02:00
parent e4c4498ba8
commit b7dcf45267
2 changed files with 4 additions and 12 deletions

View File

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

View File

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