mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-24 07:37:04 +00:00
use shorthand for ttl periods, more correct secondary ns list handling
This commit is contained in:
parent
b9e7175d9f
commit
856d94b74f
@ -503,22 +503,23 @@ $TTL {defttl} ; default time to live
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# Default ttl values
|
# Default ttl values
|
||||||
p_defttl = 86400
|
p_defttl = "1d"
|
||||||
p_refresh = 7200
|
p_refresh = "2h"
|
||||||
p_retry = 1800
|
p_retry = "15m"
|
||||||
p_expire = 1209600
|
p_expire = "14d"
|
||||||
p_negttl = 86400
|
p_negttl = "12h"
|
||||||
|
|
||||||
primary_dns = "ns1" + env["PRIMARY_HOSTNAME"]
|
primary_dns = "ns1" + env["PRIMARY_HOSTNAME"]
|
||||||
|
|
||||||
# Shorten dns ttl if file exists. Use just before moving domains, changin secondary dns servers etc
|
# Shorten dns ttl if file exists. Use before moving domains, changing secondary dns servers etc
|
||||||
if os.path.exists("/etc/forceshortdnsttl"):
|
if os.path.exists("/etc/forceshortdnsttl"):
|
||||||
p_defttl = 300
|
p_defttl = "5m"
|
||||||
p_refresh = 3600
|
p_refresh = "30m"
|
||||||
p_retry = 900
|
p_retry = "5m"
|
||||||
p_expire = 43200
|
p_expire = "1d"
|
||||||
p_negttl = 300
|
p_negttl = "5m"
|
||||||
|
|
||||||
|
additional_records = list(get_custom_dns_config(env))
|
||||||
secondary_ns_list = get_secondary_dns(additional_records, mode="NS")
|
secondary_ns_list = get_secondary_dns(additional_records, mode="NS")
|
||||||
useHiddenMaster = os.path.exists("/etc/usehiddenmasterdns") and len(secondary_ns_list) > 1
|
useHiddenMaster = os.path.exists("/etc/usehiddenmasterdns") and len(secondary_ns_list) > 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user