1
0
镜像自地址 https://github.com/mail-in-a-box/mailinabox.git 已同步 2026-03-21 18:37:23 +01:00

configurable TTL

这个提交包含在:
bilogic
2024-01-05 16:15:42 +08:00
父节点 d394c2f51d
当前提交 a498418b06
修改 2 个文件,包含 4 行新增3 行删除

查看文件

@@ -501,19 +501,19 @@ def write_nsd_zone(domain, zonefile, records, env, force):
zone = """
$ORIGIN {domain}.
$TTL 86400 ; default time to live
$TTL {ttl} ; default time to live
@ IN SOA ns1.{primary_domain}. hostmaster.{primary_domain}. (
__SERIAL__ ; serial number
7200 ; Refresh (secondary nameserver update interval)
3600 ; Retry (when refresh fails, how often to try again, should be lower than the refresh)
1209600 ; Expire (when refresh fails, how long secondary nameserver will keep records around anyway)
86400 ; Negative TTL (how long negative responses are cached)
{ttl} ; Negative TTL (how long negative responses are cached)
)
"""
# Replace replacement strings.
zone = zone.format(domain=domain, primary_domain=env["PRIMARY_HOSTNAME"])
zone = zone.format(domain=domain, primary_domain=env["PRIMARY_HOSTNAME"], ttl=env["TTL"])
# Add records.
for subdomain, querytype, value, explanation in records:

查看文件

@@ -104,6 +104,7 @@ PUBLIC_IPV6=$PUBLIC_IPV6
PRIVATE_IP=$PRIVATE_IP
PRIVATE_IPV6=$PRIVATE_IPV6
MTA_STS_MODE=${DEFAULT_MTA_STS_MODE:-enforce}
TTL=${DEFAULT_TTL:-86400}
EOF
# Start service configuration.