summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2021-09-15 14:39:58 +0300
committerGitHub <noreply@github.com>2021-09-15 14:39:58 +0300
commit7084215e72d03758d50a68b78a1a72f35933dfcf (patch)
tree1c7fdfecfdd00c98a0dd90c392b7ed7ec69ee8ee /health
parent2584ebc2a9515efea3f816f9b45bde0390d30dbb (diff)
better check for supported -F parameter in sendmail (#11506)
Diffstat (limited to 'health')
-rwxr-xr-xhealth/notifications/alarm-notify.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in
index d1f18ea1fd..ed5cf805f9 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} -F 2>&1 | grep -q "requires an argument" && opts+=(-F "${sender_name}")
+ [ -n "${sender_name}" ] && ${sendmail} -F 2>&1 | head -1 | grep -qv "sendmail: unrecognized option: F" && opts+=(-F "${sender_name}")
if [ "${debug}" = "1" ]; then
echo >&2 "--- BEGIN sendmail command ---"