Hi there, I’ve been using Mailcow for nearly a year now, while quite the learning curve getting into an email service and using tricks to get around things like port 25 and such. Can be challenging, but it’s fun. Anyway, when I was first researching this topic I saw a little about using an email service just locally on your LAN network using your devices, VMs, etc.; but I ended up never getting into that, I ended up just using Mailcow and having a personal email. But now that the knowledge is pretty there in my head of various IT stuff, I wanted to start tackling just having a local LAN email service for automatons and alerts and stuff.
And that’s why I’m here, I can’t really find any info/documentation for Mailcow if and when you would want to use Mailcow for local networks, because I rather just have one mail service than create another, if I can.
When I tried kind of setting it up myself, using features like the SMTP that some applications can use, and even using Sendmail on my Linux VMs, I notice that even though I’m using a local domain from my Firewall (OPNsense) so something like test/@/example.something.com (yes two dots, still works), and ‘example’ being the devices’ hostname, the network does forward it, but I’ve noticed from my firewall, that it’s wanting to talk to the outside Internet (my MX service I use to get passed port 25), and then goes directly back into the internal network to go to the device.
What settings or whatever do I have to edit/create, whether from the UI, or the docker/config files to make this work on my internal network only, and nothing going outside?
Here’s some of my configs that I’m doing:
Firewall is OPNsense (which is the first device after bridged ISP modem) > then to the server which is where Mailcow is on.
DNS is Unbound, which on Mailcow, it’s forwarded to the OPNsense Unbound, not the Mailcows’ Unbound.
Mail client I want to use for scripts, alert, etc., is Sendmail on Linux.
Any help is appreciated, and if you need more info, let me know.