Add MX handler

This commit is contained in:
otthorn 2021-04-05 00:40:39 +02:00
parent c04d39fecb
commit 5dcdd0cf48

15
main.py
View file

@ -121,6 +121,21 @@ def sshfp_record_handler(zone, records):
)
)
def mx_records_handler(zone, records):
"""Handler for the MX record"""
for record in zone["mx_records"]:
preference = record["priority"]
exchange = record["target"]
records['@'].append(
dns.rdtype.ANY.MX.MX(
dns.rdataclass.IN,
dns.rdatatype.MX,
preference,
priority
)
)
def txt_records_handler(zone, records):
"""Handler for TXT record"""