mirror of
https://github.com/Mailu/Mailu.git
synced 2025-05-13 22:06:31 +02:00
Do not forcefully resolve optional hostnames
This commit is contained in:
parent
a3abf8c353
commit
c20a502695
@ -73,15 +73,17 @@ class ConfigManager(dict):
|
|||||||
'mysql': 'mysql://{DB_USER}:{DB_PW}@{DB_HOST}/{DB_NAME}'
|
'mysql': 'mysql://{DB_USER}:{DB_PW}@{DB_HOST}/{DB_NAME}'
|
||||||
}
|
}
|
||||||
|
|
||||||
HOSTS = ('HOST_IMAP', 'HOST_POP3', 'HOST_AUTHSMTP', 'HOST_SMTP',
|
HOSTS = ('IMAP', 'POP3', 'AUTHSMTP', 'SMTP')
|
||||||
'HOST_WEBMAIL')
|
OPTIONAL_HOSTS = ('WEBMAIL', 'ANTISPAM')
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.config = dict()
|
self.config = dict()
|
||||||
|
|
||||||
def resolve_host(self):
|
def resolve_host(self):
|
||||||
for item in self.HOSTS:
|
optional = [item for item in self.OPTIONAL_HOSTS if item in self.config]
|
||||||
self.config[item] = system.resolve_address(self.config[item])
|
for item in self.HOSTS + optional:
|
||||||
|
host = 'HOST_' + item
|
||||||
|
self.config[host] = system.resolve_address(self.config[host])
|
||||||
|
|
||||||
def __coerce_value(self, value):
|
def __coerce_value(self, value):
|
||||||
if isinstance(value, str) and value.lower() in ('true','yes'):
|
if isinstance(value, str) and value.lower() in ('true','yes'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user