mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
INWX: support MxNull records (#2700)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
@@ -11,8 +11,6 @@ import (
|
|||||||
func AuditRecords(records []*models.RecordConfig) []error {
|
func AuditRecords(records []*models.RecordConfig) []error {
|
||||||
a := rejectif.Auditor{}
|
a := rejectif.Auditor{}
|
||||||
|
|
||||||
a.Add("MX", rejectif.MxNull) // Last verified 2020-12-28
|
|
||||||
|
|
||||||
a.Add("SRV", rejectif.SrvHasNullTarget) // Last verified 2020-12-28
|
a.Add("SRV", rejectif.SrvHasNullTarget) // Last verified 2020-12-28
|
||||||
|
|
||||||
a.Add("TXT", rejectif.TxtHasBackticks) // Last verified 2021-03-01
|
a.Add("TXT", rejectif.TxtHasBackticks) // Last verified 2021-03-01
|
||||||
|
|||||||
@@ -180,7 +180,11 @@ func makeNameserverRecordRequest(domain string, rec *models.RecordConfig) *goinw
|
|||||||
req.Content = content[:len(content)-1]
|
req.Content = content[:len(content)-1]
|
||||||
case "MX":
|
case "MX":
|
||||||
req.Priority = int(rec.MxPreference)
|
req.Priority = int(rec.MxPreference)
|
||||||
req.Content = content[:len(content)-1]
|
if content == "." {
|
||||||
|
req.Content = content
|
||||||
|
} else {
|
||||||
|
req.Content = content[:len(content)-1]
|
||||||
|
}
|
||||||
case "SRV":
|
case "SRV":
|
||||||
req.Priority = int(rec.SrvPriority)
|
req.Priority = int(rec.SrvPriority)
|
||||||
req.Content = fmt.Sprintf("%d %d %v", rec.SrvWeight, rec.SrvPort, content[:len(content)-1])
|
req.Content = fmt.Sprintf("%d %d %v", rec.SrvWeight, rec.SrvPort, content[:len(content)-1])
|
||||||
@@ -305,7 +309,11 @@ func (api *inwxAPI) GetZoneRecords(domain string, meta map[string]string) (model
|
|||||||
"PTR": true,
|
"PTR": true,
|
||||||
}
|
}
|
||||||
if rtypeAddDot[record.Type] {
|
if rtypeAddDot[record.Type] {
|
||||||
record.Content = record.Content + "."
|
if record.Type == "MX" && record.Content == "." {
|
||||||
|
// null records don't need to be modified
|
||||||
|
} else {
|
||||||
|
record.Content = record.Content + "."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rc := &models.RecordConfig{
|
rc := &models.RecordConfig{
|
||||||
|
|||||||
Reference in New Issue
Block a user