How to make a domain receiving email behind cloudflare?

I have a web server hosting multiple domains (centos + postfix + dovcot), one of my domain its dns is hosted on cloudflare (ie. abcd.com), but when I use gmail to send email to a [email protected], [email protected] will not be able to receive the email. Here is the MX record I set in cloudflare:

Type   Name   Value                                       TTL          Active
mx     mail   handled by mail.abcd.com with priority10    Automatic     
cname  mail   is an alias of abcd.com                     Automatic    grey cloud

Any knows how can I make the domain receive the emails?


You have two distinct errors in your configuration:

  1. The MX record should be for your domain, not for a subdomain.

  2. An MX record should not point to a CNAME. Point it to a record with an IP address.

An example of a working domain:

CloudFlare DNS settings