@cryptotaxi247 / netdata-1 / commits / 593043778

Instructions for simple SMTP transport (#6870)

Adds info on how to use msmtp as an alternative to sendmail, in order to have a simple MTA configuration for sending emails and auth to an existing SMTP server.

Chris Akritidis committed Sep 17, 2019 at 13:47 UTC 593043778a32d290540d34d3642c4709d4ecae42
1 file changed +23 -1
health/notifications/email/README.md
+23 -1
@@ -1,4 +1,4 @@
1 -# email
1 +# Email
2
3 You need a working `sendmail` command for email alerts to work. Almost all MTAs provide a `sendmail` interface.
4
@@ -33,4 +33,26 @@ Where `[ROLE]` is the role you want to test. The default (if you don't give a `[
33 Note that in versions before 1.16, the plugins.d directory may be installed in a different location in certain OSs (e.g. under `/usr/lib/netdata`).
34 You can always find the location of the alarm-notify.sh script in `netdata.conf`.
35
36 +## Simple SMTP transport configuration
37 +
38 +If you want an alternative to `sendmail` in order to have a simple MTA configuration for sending emails and auth to an existing SMTP server, you can do the following:
39 +
40 +- Install `msmtp`.
41 +- Modify the `sendmail` path in `health_alarm_notify.conf` to point to the location of `mstmp`:
42 +```
43 +# The full path to the sendmail command.
44 +# If empty, the system $PATH will be searched for it.
45 +# If not found, email notifications will be disabled (silently).
46 +sendmail="/usr/bin/msmtp"
47 +```
48 +- Login as netdata :
49 +```sh
50 +(sudo) su -s /bin/bash netdata
51 +```
52 +- Configure `~/.msmtprc` as shown [in the documentation](https://marlam.de/msmtp/documentation/).
53 +- Finaly set the appropriate permissions on the `.msmtprc` file :
54 +```sh
55 +chmod 600 ~/.msmtprc
56 +```
57 +
58 [![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fhealth%2Fnotifications%2Femail%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)