From f51f9436b0345ed5814c076a825f3e48cc915506 Mon Sep 17 00:00:00 2001 From: Paul Dee Date: Sat, 25 Mar 2023 16:26:45 +0100 Subject: [PATCH] Loopia: now passes test: 18:testByRecordSet (#2231) Co-authored-by: Tom Limoncelli --- providers/loopia/convert.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/providers/loopia/convert.go b/providers/loopia/convert.go index 159a4742c..ec4b590ed 100644 --- a/providers/loopia/convert.go +++ b/providers/loopia/convert.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/StackExchange/dnscontrol/v3/models" + "github.com/miekg/dns/dnsutil" ) // nativeToRecord takes a DNS record from Loopia and returns a native RecordConfig struct. @@ -24,7 +25,8 @@ func nativeToRecord(zr zoneRecord, origin string, subdomain string) (rc *models. case "CAA": err = rc.SetTargetCAAString(record.Rdata) case "MX": - err = rc.SetTargetMX(record.Priority, record.Rdata) + // See dnscontrol issue #2218 + err = rc.SetTargetMX(record.Priority, dnsutil.AddOrigin(record.Rdata, origin)+".") case "NAPTR": err = rc.SetTargetNAPTRString(record.Rdata) case "TXT":