Merge POP3_ADDRESS into IMAP_ADDRESS

dynamic-resolution^2
Florent Daigniere 2 years ago
parent 12a0b5f7d1
commit 59d1530cc0

@ -129,7 +129,7 @@ def get_server(protocol, authenticated=False):
if protocol == "imap": if protocol == "imap":
hostname, port = app.config['IMAP_ADDRESS'], 143 hostname, port = app.config['IMAP_ADDRESS'], 143
elif protocol == "pop3": elif protocol == "pop3":
hostname, port = app.config['POP3_ADDRESS'], 110 hostname, port = app.config['IMAP_ADDRESS'], 110
elif protocol == "smtp": elif protocol == "smtp":
if authenticated: if authenticated:
hostname, port = app.config['SMTP_ADDRESS'], 10025 hostname, port = app.config['SMTP_ADDRESS'], 10025

@ -75,12 +75,15 @@ ENV \
DEBUG_ASSETS="/app/static" \ DEBUG_ASSETS="/app/static" \
DEBUG_TB_INTERCEPT_REDIRECTS=False \ DEBUG_TB_INTERCEPT_REDIRECTS=False \
\ \
IMAP_ADDRESS="127.0.0.1" \ ADMIN_ADDRESS="127.0.0.1" \
POP3_ADDRESS="127.0.0.1" \ FRONT_ADDRESS="127.0.0.1" \
AUTHSMTP_ADDRESS="127.0.0.1" \
SMTP_ADDRESS="127.0.0.1" \ SMTP_ADDRESS="127.0.0.1" \
IMAP_ADDRESS="127.0.0.1" \
REDIS_ADDRESS="127.0.0.1" \ REDIS_ADDRESS="127.0.0.1" \
WEBMAIL_ADDRESS="127.0.0.1" ANTIVIRUS_ADDRESS="127.0.0.1" \
ANTISPAM_ADDRESS="127.0.0.1" \
WEBMAIL_ADDRESS="127.0.0.1" \
WEBDAV_ADDRESS="127.0.0.1"
CMD ["/bin/bash", "-c", "flask db upgrade &>/dev/null && flask mailu admin '${DEV_ADMIN/@*}' '${DEV_ADMIN#*@}' '${DEV_PASSWORD}' --mode ifmissing >/dev/null; flask --debug run --host=0.0.0.0 --port=8080"] CMD ["/bin/bash", "-c", "flask db upgrade &>/dev/null && flask mailu admin '${DEV_ADMIN/@*}' '${DEV_ADMIN#*@}' '${DEV_PASSWORD}' --mode ifmissing >/dev/null; flask --debug run --host=0.0.0.0 --port=8080"]
EOF EOF

@ -17,15 +17,15 @@ def resolve_hostname(hostname):
raise e raise e
SERVICE = { SERVICE = {
"ADMIN": "admin", 'ADMIN': 'admin',
"FRONT": "front", 'FRONT': 'front',
"SMTP": "smtp", 'SMTP': 'smtp',
"IMAP": "imap", 'IMAP': 'imap',
"REDIS": "redis", 'REDIS': 'redis',
"ANTIVIRUS:": "antivirus", 'ANTIVIRUS:': 'antivirus',
"ANTISPAM": "antispam", 'ANTISPAM': 'antispam',
"WEBMAIL": "webmail", 'WEBMAIL': 'webmail',
"WEBDAV": "webdav", 'WEBDAV': 'webdav',
} }
def set_env(required_secrets=[]): def set_env(required_secrets=[]):
""" This will set all the environment variables and retains only the secrets we need """ """ This will set all the environment variables and retains only the secrets we need """

Loading…
Cancel
Save