Mails going to spam if domain is proxied through Cloudflare

Hi,
I have bought two email hosting and have configured everything as required. Whenever I send mails from my website then I noticed that all mails goes to spam if domain is proxied through Cloudflare but if I :grey: it then everything goes right. The spam warning given by Gmail is as - Be careful with this message. Gmail could not verify that it actually came from domain.com … Also it is the case with mails sent through my website using PHP but if I send mails through gmail or outlook everything goes right. I have already :grey: my mail host and also if I :grey: the domain then everything goes well.

You probably need to amend your SPF record to include the sender address of your origin server.

I expect you have an SPF record that includes a, and when you are :grey: this resolves back to the origin IP, which is the IP sending the emails and everything is OK. Once you go :orange:, the a matches the Cloudflare IP addresses, and your origin is no longer included in the SPF record, and everything goes to spam. The quickest solution is probably to add ip4:ip4-address to your SPF record (entering your origin IP address where required). This will expose your origin IP address, so using a mail relay would probably be a a better option.

Thanks a lot, it is working now. Just added my IP address in spf record

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.