Add Mail Exchange Entries to supported entry types. Ignore config.json file.

This commit is contained in:
Hyperspeed1313 2024-10-11 22:22:18 -05:00
parent fb2257ac35
commit 79941fe432
2 changed files with 2 additions and 1 deletions

View file

@ -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"]) )