1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-07-17 01:32:29 +02:00

Handle the case where PROXY_PROTOCOL_25 is set

(cherry picked from commit 0ff18c6079)
This commit is contained in:
Florent Daigniere
2024-06-24 09:46:06 +02:00
committed by Mergify
parent 79e6957be3
commit b36018e0c1
4 changed files with 34 additions and 35 deletions

View File

@ -60,7 +60,7 @@ def run(debug):
protocol=fetch["protocol"],
host=escape_rc_string(fetch["host"]),
port=fetch["port"],
smtphost=f'{os.environ["FRONT_ADDRESS"]}' if fetch['scan'] else f'{os.environ["FRONT_ADDRESS"]}/2525',
smtphost=f'{os.environ["HOSTNAMES"].split(",")[0]}' if fetch['scan'] and os.environ.get('PROXY_PROTOCOL_25', False) else f'{os.environ["FRONT_ADDRESS"]}' if fetch['scan'] else f'{os.environ["FRONT_ADDRESS"]}/2525',
username=escape_rc_string(fetch["username"]),
password=escape_rc_string(fetch["password"]),
options=options,