From 79941fe4322b5a46762e162fdee9695f5d58b05e Mon Sep 17 00:00:00 2001 From: Hyperspeed1313 Date: Fri, 11 Oct 2024 22:22:18 -0500 Subject: [PATCH] Add Mail Exchange Entries to supported entry types. Ignore config.json file. --- .gitignore | 1 + porkbun-ddns.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7dcb236..47424b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ mydata +config.json diff --git a/porkbun-ddns.py b/porkbun-ddns.py index 5c50011..1945f6a 100755 --- a/porkbun-ddns.py +++ b/porkbun-ddns.py @@ -20,7 +20,7 @@ def getMyIP(): def replaceInvalidRecords(): for i in getRecords(rootDomain)["records"]: - if i["name"]==fqdn and (i["type"] == 'A' or i["type"] == 'ALIAS' or i["type"] == 'CNAME'): + if i["name"]==fqdn and (i["type"] == 'A' or i["type"] == 'ALIAS' or i["type"] == 'CNAME') or i["type"] == "MX": if myIP != i["content"]: printIfAllowed("Deleting existing " + i["type"] + " Record") printIfAllowed( "DELETE: " + (json.loads(requests.post(apiConfig["endpoint"] + '/dns/delete/' + rootDomain + '/' + i["id"], data = json.dumps(apiConfig)).text)["status"]) )