I could successfully add DNS records at Cloudflare DNS table.
As my NS is of Cloudflare, It was not possible to control the MX records by my CPanel directly, so I needed to
firstly create a subdomain mail.root.com and point it to the CPanel server ip.
And then manage use the cpanel DNS panel to create email users.
My problem is that I can only create email users named: [email protected] Is there a way to use CPanel and Cloudflare and create users @rootdomain.com directly?
May I ask have you got NS type of DNS records at the DNS tab of Cloudflare dashboard for your domain name, or rather referring to the domain nameservers?
Correct.
Add an A mail and make sure it’s (DNS-only) as follows and also make sure your MX is pointed to that unproxied mail.domain.com hostname:
Maybe the issue here is, your origin host / server is using domain.com instead of sub.domain.com for it’s hostname / rPTR record?
And the root domain (naked) is proxied ?
My practice is to use separate e-mail provider, like for example Namecheap e-mail (one mailbox with up to 10 aliases) for the origin host / server where I host files.
Therefore, each of the domain names I add using, be it cPanel, ISPConfig, Plesk, has it’s own mail sub-domain used to send e-mails.
My name servers are of Cloudflare for the root domain (mydomain.com)
In Cloudflare I added: an A Record for mail.mydomain.com pointing to the cpanel IP.
All my mail/mx records are not proxied
I added photos in the other replies for your to kindly check them.
Do you mean that they receive [email protected] but on the server of the mail server pointed as “mail.mydomain.com”? Because this is what I need.
Most people use the @rootdomain mail format, and cPanel supports this. Your DNS records here are properly configured for that domain. If your host doesn’t let you create a @rootdomain address, you will have to ask them why.
Not that. Standard configuration is to have a ‘mail’ hostname so email for @rootdomain follow the MX record and are delivered to the ‘mail’ server.
I could figure it out after watching a video showing an easy trick.
The steps are just leading me to have the correct DNS records without any effort as below:
Remove the website domain from Cloudflare
Change the Name servers to the CPanel ns again.
After NS is propagated, and everything works well including emailing, go to Cloudflare and add the website again.
Cloudflare will detect and copy all the correct DNS records from the CPanel DNS table.
Disable proxy (Orange cloud) from DNS records related to mail and similar services.
Yes, the initial question was about the cPanel mail server, while having your own mail server on your VPS, is another complication that I don’t know of.