@cryptotaxi247 / netdata-1 / commits / 6f1532170

Check if sendmail supports -F parameter (#11283)

* check if sendmail is a symlink to busybox * fix shellcheck * check if sendmail supports -F

Emmanuel Vasilakis committed Jul 20, 2021 at 17:34 UTC 6f1532170c9cb10755b49d17dfd187be47a2aa16
1 file changed +1 -1
health/notifications/alarm-notify.sh.in
+1 -1
@@ -939,7 +939,7 @@ send_email() {
939 fi
940
941 [ -n "${sender_email}" ] && opts+=(-f "${sender_email}")
942 - [ -n "${sender_name}" ] && sendmail --help 2>&1 | grep -q "\-F " && opts+=(-F "${sender_name}")
942 + [ -n "${sender_name}" ] && ${sendmail} -F 2>&1 | grep -q "requires an argument" && opts+=(-F "${sender_name}")
943
944 if [ "${debug}" = "1" ]; then
945 echo >&2 "--- BEGIN sendmail command ---"