Let's write a quick post about CNAMEs.

You cannot create a CNAME and make it co-exist with any other record, it just cannot be combined with anything else (with the exception of SIG record, when configuring DNSSEC). It defeats the propose of CNAME.

That's why you cannot have a CNAME with the same name as your zone name. You should create a SOA record for every zone name and because CNAME cannot be combined with any other record, it is not possible to have a CNAME in as your zone name. Funny, right?

But, it is not possible have the following configuration?

CNAME demo1.example.com => demo1.my-account.mydnsprovider.com

MX demo1.example.com 1.2.3.4

Noops, is not.  You are combining the CNAME with another record. It will not work (the MX should be ignored completely). How can you do it? Maybe using a A record like that:

A demo1.example.com => 4.5.6.7

MX demo1.example.com 1.2.3.4

This will work. But what if I told you that the demo1.my-account-mydnsprovider.com IP address can change overtime, let's say every hour (like an ELB of AWS, for example). So, the next hour it will no longer have the value 4.5.6.7 and will have the 5.6.7.8. In this case basically you are fucked up. You cannot use an A record because you could be serving stalled data, and you cannot configure a CNAME record because it is not compatible with an MX record at the same time.

So be warned, if you have problems with CNAME, you are probably combining it with other records and this is not gonna work. It took me some time to know that, hope this post clarifies a little bit how to NOT use the CNAME record.

Take care!