Using Gmail SMTP For Nagios Notification Sending

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:

Gmail Setup

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

Please note that if you are using Google’s two-factor authentication, then you will not be able to enable the “less secure apps” setting. Instead, you will need to create an “app specific password”. For more information and details on how to configure app specific passwords, please visit https://support.google.com/accounts/answer/185833?hl=en