• 0 Posts
  • 9 Comments
Joined 4 months ago
cake
Cake day: July 16th, 2026

help-circle

  • That would depend on your deployment set up. I do not do that, but many people do. I have a very bespoke ingress route that I coded myself. It consists of a serverless cloudflare edge worker to catch emails, break them into a JSON that is sent over a tunnel to cloudflared as a post. This post is directed at containerized python program that rebuilds the email and that container is the only thing with access to deliver mail to the container running stalwart.

    The reason I do this is not security though. It was a personal project more or less to see if it could be done and if it was reliable. Particularly to see if i could make a secure delivery method to bypass my ISPs CGNAT without paying for and maintaining a VPS. So far so good. And it has no monthly fee.

    Most people I know of (with CGNAT limitations) are just using a cheap VPS with open ports and then the VPS either has the email server there or a tunnel to the SMTP server. If you have a static IP or a DDNS set up where you can properly port forward, that works too.





  • Can confirm. Stalwart is really nice. They very recently released their 1.0 version. It was a couple days of issues, then later I broke it again for a few days. Other that that, the server hosting end of it has been very smooth. There is another project that goes well with it called Bulwark. The pair of those have been stable and reliable for me for months now.


  • The difficulty of self hosting your own email is high, but if you aim to do it, i would recommend Stalwart for self hosting. POP is not what you want as other people are saying. There is also a newer protocal to IMAP called JMAP.

    Some things to consider are your inbound and outbound mail paths.

    For incoming: Do you have a VPS to be your entry point? Or do you plan to port forward (assuming you even can given the prevalence of CGNAT)? There is also a way to teach a web worker like the kind cloudflare let’s you use for free to break the email down and POST it to a listener in your server across a tunnel and the listener can put it back together into an email at your server and drop it off. That being the only way I have found to get inbound mail behind a double NAT (CGNAT) without a VPS.

    For outbound, if you send stuff to major SMTP providers from a residential IP they will block it or mark as spam pretty heavily. You may want to consider a relay to make sure people actually see what you send. Brevo has a free tier, SMTP2Go is solid. There are others as well.

    There are other considerations like how will the end user interact with the mail server? I host a Bulwark instance and really love what they are doing with the project, but there are quite a few options for that.

    If you end up giving it a go, good luck, and know that it is possible!