I've been really struggling with email server hosting for a while now, as I had some issues with users getting exploited and/or my mis-config of Postfix that apparently allowed open relays for a while, etc., etc... I basically had given up completely on wanting to host email in any way. However, now I'm really annoyed with all the hoops to go through to get my clients onto 3rd party email solutions, so I'm back to the start again trying to solve this stuff to help them on my servers again.
A new server of mine is now set up on Google Compute Engine, so I'm looking into maybe using Mailgun for outgoing (and possibly incoming) email, as per some work I did recently on another GCE project where we used Mailgun. I'm not hugely familiar with GCE, but I know outgoing email is an "issue", to be brief on that.
So.. I'm considering Mailgun with Postfix on my Virtualmin server (maybe going to shift all my email hosting to go through relays, if this works.)
First trouble with this is just to be sure I'm setting things up correctly, I don't think there's a current "Mail Relay" plugin for Virtualmin/Webmin anymore? Following this:
Since I don't see a plugin that's newer than 2008 (at webmin.com), I am now wondering if it's enough to simply setting up the "Send outgoing mail via host" setting to use the Mailgun (or other) SMTP server and credentials provided from Mailgun in the Postfix setting here: Webmin > Servers > Postfix Mail Server > SMTP Authentication And Encryption
(Incoming email through a relay is a whole other subject at this point, so I'll settle for outgoing through Mailgun and incoming direct to Postfix.. hope to solve them both ultimately.)
The only other option I see is to go directly into editing the /etc/postfix/main.cf file as described here (again, instructions for Mailgun):
...phew! Lot of info and maybe too much detail, but i'm trying to both be sure I don't overlook anything, as well as provide info for future searchers.
Please advise on the best way to set up this email relaying thing so I can stop being an email server admin -- or tell me if I'm going at this all wrong? Thanks for any help setting this up well.