can you host an email server at home: yes nothing is stopping you.
the question you meant to ask: will it send and receive email with providers like gmail, M365 etc.
the answer to that question: no.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
For Example
We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.
Useful Lists
can you host an email server at home: yes nothing is stopping you.
the question you meant to ask: will it send and receive email with providers like gmail, M365 etc.
the answer to that question: no.
Yes you can do it but from what I hear without being a big company your chances of not being blacklisted are high. I wouldn't bother personally.
Currently that's not possible unless you have business internet.
Basically ISP can mark whole IP ranges as residential, so any email sent from those is marked as spam no matter how you set it up...
It's cheaper to pay Google or similar $6 per month and avoid the hassle of locally hosted mail server.
Paying Google loses privacy and control. You are paying a much higher real price than just the few $$.
Thanks all :) much appreciated
Possible - yes.
Do you want it? Probably, no. Especially, SMTP. Better use something like Zeptomail (cheapest) for delivery.
You can still self-host the receiver.
Mandatory do-not-self-host-at-home notice: custom domain at skiff.com is free, iCloud+ Mail is $0.99 and Zoho is $1.25/mo.
I do it. I have a cheap vps that is a smart relay. I use ASSP on the back end VPN to my home.
I'll preface this by saying I host my own email, but I don't host it at home. I've also entertained the idea of running a tunnel to bring it in house (although not with cloudflare). You're going to run into 2 main issues that I see:
As u/apperrault said though, technically this is probably possible to do.
The reputation problem with hosting email at home is that most residential IPs are blacklisted.
The way around this is to relay your mail through another server (all SMTP servers support this, it's often called a "smarthost"). This can either be an SMTP server you setup on a VPS with a clean IP or a commercial SMTP relay like Amazon SES. Cloudflare tunnels are for inbound traffic and can't help with this.
Delivering email to a home SMTP server doesn't have any reputation challenges, you just need to expose port 25 on your SMTP server to the internet (or again proxy it somehow).
I do too. Axigen mail server and sendinblue now brevity as free smarthost. Mainly use it for notifications from homelab and for things that don't play as well with other free smtp such as the printer I use for scanning and emailing stuff
I would say no. Most ISPs block incoming mail port (25) to residential IPs. Test your ports before everything else.
I don't think so. (I've asked about this on Cloudflare's forum in the past.) You can host a mail server at home, but not through a Cloudflare tunnel. A domain's MX record for its mail server must point to an A or AAAA record, but a Cloudflare tunnel can only be specified using a CNAME record.
can I host a mail server on my home server and use cloudflare tunnel.
No. IPs of cloud flare are blocked on most email servers and you really need port 25 be opened. Also residential IPs are in PBL lists, which also used on email servers to get rid of army infected PC. If you going to get intermediate proxy, choose them carefully due to a lot of cheap (or with bad reputation) hostings are rejected (or has much more spam score) too