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":
hostname, port = app.config['IMAP_ADDRESS'], 143
elif protocol == "pop3":
hostname, port = app.config['POP3_ADDRESS'], 110
hostname, port = app.config['IMAP_ADDRESS'], 110
elif protocol == "smtp":
if authenticated:
hostname, port = app.config['SMTP_ADDRESS'], 10025

@ -75,12 +75,15 @@ ENV \
DEBUG_ASSETS="/app/static" \
DEBUG_TB_INTERCEPT_REDIRECTS=False \
\
IMAP_ADDRESS="127.0.0.1" \
POP3_ADDRESS="127.0.0.1" \
AUTHSMTP_ADDRESS="127.0.0.1" \
ADMIN_ADDRESS="127.0.0.1" \
FRONT_ADDRESS="127.0.0.1" \
SMTP_ADDRESS="127.0.0.1" \
IMAP_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"]
EOF

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

Loading…
Cancel
Save