Cloudflare tunnel for home lab mailserver

Hi! I am trying to understand how to setup a mailserver docker in my homelab using cloudflare tunnel to a reverse proxy (or I could bypass the reverse proxy if unavoidable). This is to avoid restrictions on port 25 that many ISP or VPS hosts put in place. Anyone can redirect me to a solution or to the correct docs? Thanks!
5 Replies
Laudian
Laudian2d ago
You can't use a tunnel to set up a public mailserver.
Microserver
MicroserverOP2d ago
is there any recommended way to have the DNS pointing to a homelab server where the port 25 could be closed and the IP can change?
Laudian
Laudian2d ago
I'd recomnend to simply not run a mailserver from home. You will run into all sirts of problems.
Microserver
MicroserverOP2d ago
everybody is saying such, but it's for me to learn, I will probably send only notifications from my apps to myself from this server, so I will have to run it from my homeserver, Otherwise with AWS SES it was much easier (and I already use it in production)
Laudian
Laudian2d ago
Running your own mailserver is a cool hobby (I'm also running my own mailserver). But it's simply not practical to run a mailserver from home. You need a static IP with the ability to set reverse DNS records for that IP. The "workaround" for running a mailserver from home is generally to run a mailserver somewhere else and have it forward emails to your server. That's a much more complicated setup and just makes your mailserver at home superfluous at best. I really don't want to discourage you from running your own mailserver. But if you want to make it work, get a VPS or root server that does not block port 25 and has a good IP reputation.

Did you find this page helpful?