1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-22 07:17:05 +00:00

If xfr is subnet, do not create "notify" entry (#1672)

This commit is contained in:
Edwin Schaap 2019-11-10 17:58:22 +01:00 committed by Joshua Tauberer
parent fa792f664e
commit 2f54f39f31

View File

@ -523,9 +523,11 @@ zone:
""" % (domain, zonefile)
# If custom secondary nameservers have been set, allow zone transfers
# and notifies to them.
# and, if not a subnet, notifies to them.
for ipaddr in get_secondary_dns(additional_records, mode="xfr"):
nsdconf += "\n\tnotify: %s NOKEY\n\tprovide-xfr: %s NOKEY\n" % (ipaddr, ipaddr)
if "/" not in ipaddr:
nsdconf += "\n\tnotify: %s NOKEY" % (ipaddr)
nsdconf += "\n\tprovide-xfr: %s NOKEY\n" % (ipaddr)
# Check if the file is changing. If it isn't changing,
# return False to flag that no change was made.