add EMAIL_SERVERS_WITH_PRIORITY and EMAIL_SERVERS config

This commit is contained in:
Son NK 2019-12-02 00:11:19 +00:00
parent 79a7985221
commit 5d9420a763
3 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,7 @@ SUPPORT_EMAIL=support@sl.local
ADMIN_EMAIL=to_fill
# Max number emails user can generate for free plan
MAX_NB_EMAIL_FREE_PLAN=3
EMAIL_SERVERS_WITH_PRIORITY=[(10, "email.hostname.")]
# Database
RESET_DB=true

View File

@ -43,6 +43,11 @@ ADMIN_EMAIL = os.environ["ADMIN_EMAIL"]
MAX_NB_EMAIL_FREE_PLAN = int(os.environ["MAX_NB_EMAIL_FREE_PLAN"])
POSTFIX_SERVER = "1.1.1.1"
# list of (priority, email server)
EMAIL_SERVERS_WITH_PRIORITY = eval(
os.environ["EMAIL_SERVERS_WITH_PRIORITY"]
) # [(10, "email.hostname.")]
EMAIL_SERVERS = [es for _, es in EMAIL_SERVERS_WITH_PRIORITY]
# Database
RESET_DB = "RESET_DB" in os.environ

View File

@ -12,6 +12,7 @@ SUPPORT_EMAIL=support@sl.local
ADMIN_EMAIL=to_fill
# Max number emails user can generate for free plan
MAX_NB_EMAIL_FREE_PLAN=3
EMAIL_SERVERS_WITH_PRIORITY=[(10, "email.hostname.")]
# Database
RESET_DB=true