Skip to content

Instantly share code, notes, and snippets.

@leemour
Forked from jcdarwin/monit-and-gmail
Last active January 16, 2019 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leemour/cd8a76e0f8da2a08e00c0bf39d2d7d44 to your computer and use it in GitHub Desktop.
Save leemour/cd8a76e0f8da2a08e00c0bf39d2d7d44 to your computer and use it in GitHub Desktop.
How to allow monit to use gmail as a smtp relay to send out alert emails
# visit https://accounts.google.com/DisplayUnlockCaptcha and click to allow access
# edit /etc/monit/monitrc to include the following
set mailserver smtp.gmail.com port 587
username "whoever@gmail.com" password "whatever"
using tls
with timeout 30 seconds
# run the following to validate access
/etc/init.d/monit restart
monit validate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment