✨ Add MX handler
This commit is contained in:
parent
c04d39fecb
commit
5dcdd0cf48
1 changed files with 15 additions and 0 deletions
15
main.py
15
main.py
|
@ -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"""
|
||||
|
|
Loading…
Reference in a new issue