SYSTEM INFORMATION | |
---|---|
OS type and version | Rocky 9.2 |
Virtualmin version | 7.7 |
In the quest to be able to send emails from both Virtualmin and the servers hosted on it, I set up a free Gmail account for myself for the express purpose of sending emails (to my main account, and to others as needed). Because my server is on a Comcast home (not Business) account, port 25 is blocked by Comcast, preventing me from relaying emails from the server itself. Hence, the need to use a Gmail account.
The configuration is somewhat tricky, and it took me multiple tries to get all the parts lined up correctly, so I am documenting this here for the next person that may run into this.
Step 1 - set up your Gmail account!
The trick here is that you can’t just use your address and password to send the email - you need to enable 2FA on the account, then create an App password for the systems to use. Full details can be found here.
Step 2 - Configure Webmin to use the Gmail account
In Webmin, go to Webmin => Webmin Configuration => Sending Email
Configure your settings as below, substituting the email address you created for the one in the example. Note that the password is the App Password, and not the “main” one to the Gmail account!
You will want to make sure you secure the heck out of your newly created Gmail account - set up multiple forms of 2FA such as a phone number, 6-Digit code, Backup Email, etc.
Hopefully this is helpful for other newbies!