Add optional OTHER_ALIAS_DOMAINS setting. Create ALIAS_DOMAINS setting that is the list of domain user can use when creating alias.

This commit is contained in:
Son NK 2020-01-22 09:46:26 +01:00
parent f7f8c6769d
commit a6507a39e4
2 changed files with 13 additions and 0 deletions

View File

@ -14,6 +14,9 @@ URL=http://localhost:7777
# domain used to create alias
EMAIL_DOMAIN=sl.local
# other domains that can be used to create aliases, in addition to EMAIL_DOMAIN
OTHER_ALIAS_DOMAINS=["domain1.com", "domain2.com"]
# transactional email is sent from this email address
SUPPORT_EMAIL=support@sl.local

View File

@ -47,6 +47,16 @@ MAX_NB_EMAIL_FREE_PLAN = int(os.environ["MAX_NB_EMAIL_FREE_PLAN"])
# allow to override postfix server locally
POSTFIX_SERVER = os.environ.get("POSTFIX_SERVER", "240.0.0.1")
if "OTHER_ALIAS_DOMAINS" in os.environ:
OTHER_ALIAS_DOMAINS = eval(
os.environ["OTHER_ALIAS_DOMAINS"]
) # ["domain1.com", "domain2.com"]
else:
OTHER_ALIAS_DOMAINS = []
# List of domains user can use to create alias
ALIAS_DOMAINS = OTHER_ALIAS_DOMAINS + [EMAIL_DOMAIN]
# list of (priority, email server)
EMAIL_SERVERS_WITH_PRIORITY = eval(
os.environ["EMAIL_SERVERS_WITH_PRIORITY"]