r/CloudFlare: Is there a real solution for proxying an email server through Cloudflare?

r/CloudFlare: Is there a real solution for proxying an email server through Cloudflare?
💡
This article archives a conversation, which took place in a subreddit post (original source linked below) and to which I contributed a solution or answer (with the u/MasterofSynapse handle), in a Q&A format.

Original Reddit post: https://www.reddit.com/r/CloudFlare/comments/xcla39/is_there_a_real_solution_for_proxying_an_email/

Question

Hi, I’ve been looking around for a while now for a proper solution for a self hosted email server through Cloudflare. The problem is that everyone seems to think grey clouding your mail server is the solution. This really shouldn’t be the case, I’ve been getting DDoSed almost daily at this point for hours at a time because of my mail server being grey clouded. I also don’t have the budget to pay for a service like CloudFlare Spectrum or even Google Workspace. Is there anything I can do that wouldn’t require me to get rid of my mail server?

Answer

Honestly, the security, compliance and availability requirements for a mail server will always be there, regardless if you self-host it or not.

So, to save yourself a lot of headaches down the line if for example an important mail is lost because you overlooked an important setting or don't have backups, go to any hoster you want and buy a cheap hosting package with mail. That way you can keep your custom mail domain but don't have to worry about the implications of a self-hosted mail server, like DDoS.