diff options
author | Emmanuel Vasilakis <mrzammler@mm.st> | 2021-07-20 17:34:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 17:34:44 +0300 |
commit | 6f1532170c9cb10755b49d17dfd187be47a2aa16 (patch) | |
tree | 86532b4defcbd341e0aaa8189d74b5f8043d6bf6 /health | |
parent | 7e17ede6af3d02b6b54162bb932eab8b0bec88ea (diff) |
Check if sendmail supports -F parameter (#11283)
* check if sendmail is a symlink to busybox
* fix shellcheck
* check if sendmail supports -F
Diffstat (limited to 'health')
-rwxr-xr-x | health/notifications/alarm-notify.sh.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in index 98f84a71d3..58e44d3d88 100755 --- a/health/notifications/alarm-notify.sh.in +++ b/health/notifications/alarm-notify.sh.in @@ -939,7 +939,7 @@ send_email() { fi [ -n "${sender_email}" ] && opts+=(-f "${sender_email}") - [ -n "${sender_name}" ] && sendmail --help 2>&1 | grep -q "\-F " && opts+=(-F "${sender_name}") + [ -n "${sender_name}" ] && ${sendmail} -F 2>&1 | grep -q "requires an argument" && opts+=(-F "${sender_name}") if [ "${debug}" = "1" ]; then echo >&2 "--- BEGIN sendmail command ---" |