Update email notification docs with info about setup in Docker. (#14555)
Austin S. Hemmelgarn committed
Feb 17, 2023 at 18:13 UTC
93166eee2bc1167afaede310322b3cff11675221
1 file changed
+15
-9
health/notifications/email/README.md
+15
-9
@@ -14,6 +14,9 @@ You need a working `sendmail` command for email alerts to work. Almost all MTAs
14
15
Netdata sends all emails as user `netdata`, so make sure your `sendmail` works for local users.
16
17
+If you are using our Docker images, or are running Netdata on a system that does not have a working `sendmail`
18
+command, see [the section below about using msmtp in place of sendmail](#using-msmtp-instead-of-sendmail).
19
+
20
email notifications look like this:
21
22

@@ -57,26 +60,29 @@ X-Netdata-Host: winterland
60
X-Netdata-Role: sysadmin
61
```
62
60
-## Simple SMTP transport configuration
63
+## Using msmtp instead of sendmail
64
+
65
+[msmtp](https://marlam.de/msmtp/) provides a simple alternative to a full-blown local mail server and `sendmail`
66
+that will still allow you to send email notifications. It comes pre-installed in our Docker images, and is available
67
+on most distributions in the system package repositories.
68
62
-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:
69
+To use msmtp with Netdata for sending email alerts:
70
64
-- Install `msmtp`.
65
-- Modify the `sendmail` path in `health_alarm_notify.conf` to point to the location of `msmtp`:
71
+1. If it’s not already installed, install msmtp. Most distributions have it in their package repositories with the
72
+ package name `msmtp`.
73
+2. Modify the `sendmail` path in `health_alarm_notify.conf` to point to the location of `msmtp`:
74
```
75
# The full path to the sendmail command.
76
# If empty, the system $PATH will be searched for it.
77
# If not found, email notifications will be disabled (silently).
78
sendmail="/usr/bin/msmtp"
79
```
72
-- Login as netdata :
80
+3. Login as netdata:
81
```sh
82
(sudo) su -s /bin/bash netdata
83
```
76
-- Configure `~/.msmtprc` as shown [in the documentation](https://marlam.de/msmtp/documentation/).
77
-- Finally set the appropriate permissions on the `.msmtprc` file :
84
+4. Configure `~/.msmtprc` as shown [in the documentation](https://marlam.de/msmtp/documentation/).
85
+5. Finally set the appropriate permissions on the `.msmtprc` file :
86
```sh
87
chmod 600 ~/.msmtprc
88
```
81
-
82
-