I'm already activated Cloudflare for my website and to apply that I had to replace my domain default nameservers with Cloudflare nameservers. Now my website has to send emails to the mail servers, but I have a problem with that, especially with the 3 major mail servers.

Gmail and Hotmail receive my website emails in Spam/Junk folder not in inbox, and Yahoo mail doesn't receive messages from my website at all. So in order to solve this issue I was recommended to set a reverse DNS for my website.

Now to do that I had to set a PTR records in my domain settings so reverse DNS lookup of my hosting IP should lead to my domain, but because my domain provider ( name.com ) doesn't offer that, I was told to solve this issue through my hosting provider ( OVH ). But my hosting provider told me I have to solve this issue with Cloudflare support as long as I use Cloudflare servers to protect my website. In Cloudflare support section I read that they don't offer PTR records too and such issue should be solved by the hosting provider, so I'm really stuck in a very narrow place now!

The reverse DNS lookup ( my hosting IP ) leads to my domain, but DNS lookup ( my domain ) leads to Cloudflare IP not to my hosting IP.

If I removed Cloudflare namerservers and bring back the default nameservers in my domain account the problem will be solved, but I need to keep Cloudflare in my website, and in the same time I need my website outcoming emails be accepted by all email servers.

Can you help me to solve this issue.

  • Off topic as it involved CPanel (as per comment on my answer). As such off topic. – TomTom Apr 4 '16 at 10:51
  • 2
    I didn't ask about Cpanel !... I just mentioned that I use Cpanel to manage my website, but I also use SSH and FTP. – Zorba Apr 4 '16 at 11:08

The PTR record will need to be set at OVH, however, before being able to do that, you will need to create an A record at CloudFlare for the servers hostname and set that record to not pass through CloudFlare. Say, for example, if your server name is server.domain.com, do the following:

  • In CloudFlare, create an A record for server.domain.com with the IP of your server. Make sure it does not pass through CloudFlare.
  • Ask OVH to setup Reverse DNS for your IP to server.domain.com.
  • Make sure the MTA on your server uses server.domain.com in the HELLO line. Usually it sets it automatically from the hostname.
| improve this answer | |
  • Actually I need to set a reverse DNS for the domain not for any subdomain. In OVH the user can create a reverse DNS by himself, and I already created or actually changed the current one ( IP hosting to my domain ) and reverse DNS lookup gives now a positive result, but my problem with DNS lookup, the result of my domain gives the IP of Coudflare not OVH, and I think OVH can do nothing about that. A record of domain already created in Cloudflare and pointed by OVH IP – Zorba Apr 4 '16 at 10:30
  • 1
    That is your problem. Just use a subdomain as server hostname. You cannot resolve it otherwise. – Florin Asăvoaie Apr 4 '16 at 10:45
  • Well is there any possibility to test or to know from which domain or subdomain the emails are out coming? ... because I already created the subdomain as ( mail.mydomain.com ) but I still think the messages coming out from domain.com – Zorba Apr 4 '16 at 11:13
  • That does not matter. MTAs check the server and not the message. It is enough to do what I said. Adding SPF and DomainKeys will be a big plus too. – Florin Asăvoaie Apr 4 '16 at 12:11
  • Well, I already made the first two steps... but about ( MTA ), My server MTA is ( Exim ) but I never found any command that makes such check where I can know the mail server address and see the word Hello, so would you please give me the command line to make that check. – Zorba Apr 5 '16 at 20:31

Consider not using cloudflare for your email server. Simple like that. Website and email on separate IP addresses and voila. I have the PTR records set by my internet provider and email is not routed through cloudflare.

| improve this answer | |
  • Well if I created a subdomain ( mail.mydomain.com ) and added the A record of it in both my domain and Cloudflare settings ( pointed to OVH IP ) then created a reverse DNS for it in OVH, then the result for both DNS and reverse DNS lookup was compatible ( in the opposite way ) ... How to make sure that subdomain will be the only responsible on my website outcoming emails ( I'm using Cpanel ) ? – Zorba Apr 4 '16 at 10:36
  • Not using CPanel and learning administration. Voting to close now - any website panel makes your question not supported here. – TomTom Apr 4 '16 at 10:50
  • My post is not specifically about Cpanel ... I need to make sure the emails of my website comes out from a specific subdomain, not from the domain. – Zorba Apr 4 '16 at 11:03
  • You asked how to do it in Cpanel. We generally do not support anything involving control panels. – TomTom Apr 4 '16 at 11:07
  • How can someone use Cloudflare for emails when it does not offer email hosting or forwarding? – Pothi Kalimuthu May 10 '16 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.