After moving my DNS from Dynadot to CloudFlare I lost the ability to use Dynadot as a email forwarder. For anyone not sure what that is, essentially it allows you to receive email at name@example.com and have it automatically forwarded somewhere else (like your personal Gmail account). So, what I did is leverage a free account with Mailgun to setup the same thing.

Mailgun Setup

  • Create a Mailgun account
  • Add your domain name example.com (no www)
  • Keep the page open and open a new tab to CloudFlare

Cloudflare

  • Choose your site and select DNS Settings
  • Add the two Text records
  • Add the CNAME record

  • Make sure the Cloudflare cloud is gray and not orange/active

  • Add the two MX records

  • Name example.com (no www)

  • Mail handled by mxa.mailgun.org or mxb.mailgun.org

Back to Mailgun

  • Click add

  • Click Check DNS Records Now

  • It’ll tell you once it detects the updated DNS records

Email Forwarding

  • From Mailgun, choose Routes
  • Create Your First Route
  • Filter Expression This is where you list the email address you want to forward to Gmail match_recipient("name@example.com")
  • Actions This is the Gmail address you want to receive your email Forward: address@gmail.com or  forward("address@gmail.com")
  • Priority 10
  • Description Name it something so you remember what it’s for

Use Gmail to send mail from your custom domain

  • Log in to Gmail and go to Settings
  • Go to Accounts and Import
  • Go to Send mail as and select Add another email you own

  • name: Anything you want

  • email address: name@example.com (this should be the email you set up in the steps before)

  • Leave treat as an alias checked

  • Click Next Step

  • For the following info you’ll need to login to mailgun and use the info under Domain Information

  • SMTP Server Use SMTP Hostname from Mailgun

  • Username Use Default SMTP Login from Mailgun

  • Password Use Default Password from Mailgun

  • Leave Secured connection using TLS selected

  • Click add account

  • Once it’s verified you should be able to compose emails and list your new email in the from line so nobody needs to know it’s coming from your personal Gmail account.

Also see: Mailgun API documentation - Routes