1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-01-06 00:26:08 +02:00
(cherry picked from commit 1917bf7ee4)
This commit is contained in:
Florent Daigniere 2024-06-24 10:21:16 +02:00 committed by Mergify
parent 7556df2fa7
commit 6fc97ee2cb

View File

@ -133,11 +133,11 @@ def clean_env():
PORTS_REQUIRING_TLS=['443', '465', '993', '995']
ALL_PORTS='25,80,443,465,993,995,4190'
for item in os.environ.get('PORTS', ALL_PORTS).split(','):
if item in PORTS_REQUIRING_TLS and os.environ['TLS_FLAVOR'] == 'notls':
if item in PORTS_REQUIRING_TLS and os.environ.get('TLS_FLAVOR','') == 'notls':
continue
os.environ[f'PORT_{item}']='True'
if os.environ['TLS_FLAVOR'] != 'notls':
if os.environ.get('TLS_FLAVOR', '') != 'notls':
for item in os.environ.get('TLS', ALL_PORTS).split(','):
if item in PORTS_REQUIRING_TLS:
os.environ[f'TLS_{item}']='True'