Can I circumvent a port 25 block by proxying my mailserver through a cloud VM? reddit / selfhosted ---------------------------------------------------------------------- Loren-DB · 2023-12-18 15:07 The ISP that my server is behind blocks port 25 (I think it's Comcast/Xfinity but I'm not sure; this server is a collaborative project so it's not hosted at my home). This is a problem because I wanted to set up a mailserver to provide mail sending for all my other services. Would it be possible to set up a cloud VM (I'm thinking a free tier Oracle Cloud VM) and have it act as a traffic proxy? In other words, I'd set it up so that DNS pointed at the cloud VM, which would have a simple caddyfile installed to proxy all email traffic to my actual server. My main concern is that this might mess up SMTP TLS, since the certificates would be issued to the main server but might appear to be coming from the cloud VM. If nothing else works, I'll probably just create a Protonmail email address that I use for my services, but I'd prefer to be able to host my own email server. ---------------------------------------------------------------------- Anejey · 2023-12-18 15:10 It'll work, I have the same setup, but I have yet to get TLS working (that being said I just haven't gotten around to it). Problem is you won't be able the add PTR records in Oracle free tier. You'll need to use different VPS provider. ---------------------------------------------------------------------- Loren-DB · 2023-12-18 15:12 Hm, interesting. The PTR records won't work even with dynamic DNS? I could go with the Google Cloud free tier, but they have a traffic limit of 20 GB monthly; I doubt I'll exceed that, but I don't want any surprising charges happening. ---------------------------------------------------------------------- Anejey · 2023-12-18 15:18 I don't know, haven't tried that. You could get it working with Oracle, you'd just have to upgrade to a paid account but not actually exceed any always-free limits. This way you should be able to contact Oracle support so they can issue the record. Or maybe even set it yourself, but I dunno about that. ---------------------------------------------------------------------- Square_Lawfulness_33 · 2023-12-18 16:28 If your going to use a VPS way not run the mail server from the VPS directly? ---------------------------------------------------------------------- Loren-DB · 2023-12-18 17:42 Good question. Mainly I want to make good use of my server (an older Dell with 2x 10-core Xeons, 192 GB RAM, RAID array with \~21 TB usable space). Also, the free VPS options generally are very limited in both compute power and storage. ---------------------------------------------------------------------- nyanotech · 2023-12-18 22:16 yes, but most providers also block 25 (some will lift it if you bother support about it), so double-check that before settling on one ---------------------------------------------------------------------- Internal_Seesaw5612 · 2023-12-18 22:22 My mailu instance runs this way and don't have any issues really. Just setup a wireguard tunnel and forward port 25 through it. Your SMTP relay will need to be on the VPS server or you will have a open relay. If you run the relay locally than it will only see the IP of your VPS. Which means everything on the internet is allowed to send email from your server. ---------------------------------------------------------------------- GrumpyCat79 · 2023-12-19 00:53 Are you expecting to send millions or email per minutes? SMTP doesn't use much ressource... My mail container (Dovecot + Postfix) uses like 60MB of RAM and almost no CPU at all. Keeping your SMTP server on premise doesn't "make good use" or your server. Even a raspberry pi would be overkill for that simple task ---------------------------------------------------------------------- seanpmassey · 2023-12-19 04:21 Don’t bother running an SMTP relay in a VPS. There are services like MXRoute and Mailhop that will do this for you. MXRoute is fairly inexpensive and has good documentation, and Mailhop has a free tier that allows 1000 emails per month. There are other services like this too. But these are the ones I have direct experience with.