mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 01:47:53 +08:00
Fixed MX records on NS1 (#783)
This commit is contained in:
parent
df69016cd1
commit
644ba70e87
1 changed files with 3 additions and 1 deletions
|
@ -133,7 +133,9 @@ func buildRecord(recs models.Records, domain string, id string) *dns.Record {
|
|||
Zone: domain,
|
||||
}
|
||||
for _, r := range recs {
|
||||
if r.Type == "TXT" {
|
||||
if r.Type == "MX" {
|
||||
rec.AddAnswer(&dns.Answer{Rdata: strings.Split(fmt.Sprintf("%d %v", r.MxPreference, r.GetTargetField()), " ")})
|
||||
} else if r.Type == "TXT" {
|
||||
rec.AddAnswer(&dns.Answer{Rdata: r.TxtStrings})
|
||||
} else if r.Type == "SRV" {
|
||||
rec.AddAnswer(&dns.Answer{Rdata: strings.Split(fmt.Sprintf("%d %d %d %v", r.SrvPriority, r.SrvWeight, r.SrvPort, r.GetTargetField()), " ")})
|
||||
|
|
Loading…
Reference in a new issue