auroraresearchlab / netbox-dns

Netbox Dns is a netbox plugin for managing zone, nameserver and record inventory.
MIT License
207 stars 19 forks source link

MX record type limited to integer #282

Closed soundtech2003 closed 1 year ago

soundtech2003 commented 1 year ago

During testing and vetting of the plugin (which is a great plugin for organizing and automating our DNS) we noticed that when trying to create an MX record the only supported type of value is integer. In an instance where you are using hosted mail (say, Microsoft Office 365) your MX record would be something like the follows: company-com.mail.protection.outlook.com Unfortunately, with hosted mail there is no integer/IP address to be used for the record. Would a fix for this field be a large issue to remedy?

peteeckel commented 1 year ago

Hi @soundtech2003, I'm glad you find NetBox DNS useful.

I just checked the MX record for one of my customers just to be on the safe side, and their MX entry is indeed

dig +short <redacted>.de mx 
1 <redacted>-de.mail.protection.outlook.com.

(note the 1 at the begining of the RDATA returned).

I would have been pretty surprised if the MX had been missing the PRIORITY field, as RFC 1035, Section 3.3.9 specifies the format of MX RDATA exactly like that and dnspython (which is being used for validating the value of the records) usually is more permissive than it should be.

Bottom line: To my knowledge and that of the authors of dnspython the PRIORITY field is not optional.

Can you please check whether your MX record is a actually missing the PRIORITY?

soundtech2003 commented 1 year ago

Hello @peteeckel , Thank you for the prompt response. I did some digging on my end and found exactly that; the priority was indeed missing from the import. I should be good to go! Thank you!

peteeckel commented 1 year ago

@soundtech2003 thanks for the feedback, good to know everything is fine!

Could you please close the issue?