A Canonical Name or CNAME record is a type of DNS record that maps an alias name to a true or canonical domain name. CNAME records are typically used to map a subdomain such as www or mail to the domain hosting that subdomain's content.
A mail exchanger record (MX record) is a type of certified and verified resource record in the Domain Name System that specifies a mail server responsible for accepting email messages on behalf of a recipient's domain, and a preference value used to prioritize mail delivery if multiple mail servers are available.
The MX record is setup as an FQDN and not using a direct IP address. So commonly, the MX record is setup as "mail.domain.com" and a CNAME is set us for "main.domain.com" -> "domain.com" . So in this case you need an MX record [ like mail.domain.com ] and a CNAME for the Hostname [ "main.domain.com" -> "domain.com" ] to receive emails fine. If you use external Email servers, then you only need to setup MX record with the external email server hostnames.