How to configure DNS for Mailgun with the same TXT and CNAME?

Mailgun tells me to create a TXT record for mg.mydomain.com with a value of v=spf1 ... plus a CNAME record for email.mg.mydomain.com with a value of mailgun.org .

I did this and mailgun checked my domain without any problems. The problem is that when I send emails, some receiving mail servers reject my emails with the message "Sender address rejected: domain not found." I am sure that this is because "mg.mydomain.com" does not exist - I do not have a CNAME for it. However, I cannot create a CNAME for it, because it is already used to record TXT .

So now I do not know what to do. Can I put this thing v=spf1 in another TXT record so that I can free mg. CNAME for sender verification to work on these picky servers?

+7
dns mailgun
source share
1 answer

It seems the missing component is the A record for mg.mydomain.com

BUT

 mg.mydomain.com. A nnn.nnn.nnn.nnn: 

If email.mg.mydomain.com CNAME is in the same DNS zone as mydomain.com , mg.mydomain.com , etc., and there is A record , where ip indicates the host name, then configure CNAME records, TXT and MX should be simple:

CNAME

 email.mg.mydomain.com. CNAME mailgun.org. 

Txt

 mydomain.com. TXT v=spf1 a include:mailgun.org ~all 

(optional for admission)

MX

 mydomain.com. MX mxa.mailgun.org. mydomain.com. MX mxb.mailgun.org. 
+10
source share

All Articles