From fddab5d4327c4e48bb6f5df0e0a48e980fb77588 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Fri, 2 Jan 2015 23:39:09 +0000 Subject: [PATCH] allow the dns api to set srv records see https://discourse.mailinabox.email/t/create-srv-record-at-the-dns-server/225 --- CHANGELOG.md | 1 + management/dns_update.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4155ed69..298a398f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Control panel: * Status checks would fail to load if openssh-sever was not pre-installed, but openssh-server is not required. * The local DNS cache is cleared before running the status checks using 'rncd' now rather than restarting 'bind9', which should be faster and wont interrupt other services. +* The DNS API now allows the setting of SRV records. Misc: diff --git a/management/dns_update.py b/management/dns_update.py index 5a305993..7c01f6df 100755 --- a/management/dns_update.py +++ b/management/dns_update.py @@ -669,7 +669,7 @@ def set_custom_dns_record(qname, rtype, value, env): v = ipaddress.ip_address(value) if rtype == "A" and not isinstance(v, ipaddress.IPv4Address): raise ValueError("That's an IPv6 address.") if rtype == "AAAA" and not isinstance(v, ipaddress.IPv6Address): raise ValueError("That's an IPv4 address.") - elif rtype in ("CNAME", "TXT"): + elif rtype in ("CNAME", "TXT", "SRV"): # anything goes pass else: