Instructions may be found in the Legacy Email Configuration Documentation.
A step-by-step guide to configuring Email Notifications on your NEMS Server.
With NEMS System Settings Tool configuration is a breeze. Enter your email server settings into the interface and then press Save.
When using Gmail for SMTP, a few extra steps are required.
First, if you are a G Suite user (that is to say, you're using Gmail but have an @yourdomain.com email address on their service as opposed to an @gmail.com address), visit this page and configure the SMTP Relay Service like this:
Of course, if you happen to have a static public IP address on your NEMS server, go ahead and enable IP filtering for even more security.
Then, visit this page and enable “Allow users to manage their access to less secure apps”.
Now that you've done that, or if you are not a G Suite user, you'll need to enable the setting for “less secure apps” here: https://myaccount.google.com/lesssecureapps
I've written an easy-to-use script which will load your settings from resource.cfg and send you a test email. It will also show you in the terminal the results, which may be helpful if you believe there is an error (since you'll be able to see the output of sendemail).
To run the test script:
sudo nems-mailtest email@example.com
where [email protected] is your actual recipient email address (must be different than the one you set in resource.cfg).
Configuring notifications in NEMS (or Nagios for that matter) requires a knowledge of what the single-character options mean. Here is an overview:
When you see w,u,c,r,f,n these are the definitions:
When you see d,u,r,f,s,n these are the definitions: