8

I'm trying to setup my domain to receive emails through Mailgun and Cloudflare, and i think i'm really closest but can't make it work.

In Mailgun, i've all DNS verified:

enter image description here

I think the problem is in Cloudflare, configuring the subdomain (that Mailgun suggest me to create mg.mydomain.com)

enter image description here

I have not got any record related with the subdomain (mg.mydomain.com). Is any change i'm something?

Also, I already setup a Route in mailgun to redirect incoming emails to my email address.

Thanks in advance!

mauriblint
  • 1,802
  • 2
  • 29
  • 46

2 Answers2

5

I found the answer here: https://community.cloudflare.com/t/setting-mx-records-for-a-subdomain/4942/2

What you need to do is:

On Mailgun:

  1. Setup a domain for your incoming email (e.g.: foo.example.com)

On Cloudflare:

  1. Go to DNS
  2. Add an A record for your subdomain (foo.example.com)
  3. Add an MX record. For the first field (name), put: foo.
  4. When you click 'click to configure', it will open a dialog box where you can put the values for mxa.mailgun.org
  5. Repeat for mxb.mailgun.org
toast38coza
  • 8,650
  • 3
  • 39
  • 32
  • An A record is not required. See https://www.chrisanthropic.com/blog/2014/mail-forwarding-with-mailgun-and-cloudflare/ – James Gentes Dec 01 '18 at 17:40
2

For the CNAME record, you just need to make sure that the status is configured as 'DNS Only' (the little cloud on the right is grey)

Cloudflare DNS Configurations

Roy Toledo
  • 643
  • 4
  • 20
  • This fixed the problem for me. My problem was different from the OP. I was unable to track clicks in my email. – GunnerFan Jun 16 '19 at 06:26