From fbc9a252f555384c7602dc7ef38418b6431490c5 Mon Sep 17 00:00:00 2001 From: xmirakulix Date: Sat, 2 Aug 2025 08:04:43 +0200 Subject: [PATCH] update SMTP template, added suport for sendmail (#219) * update smtp template, add suport for sendmail * add sendmail to DSM and bump version * correct errormsg and version number --- notify_templates/notify_DSM.sh | 7 +++++-- notify_templates/notify_smtp.sh | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/notify_templates/notify_DSM.sh b/notify_templates/notify_DSM.sh index 08d85c1..3afe0ab 100644 --- a/notify_templates/notify_DSM.sh +++ b/notify_templates/notify_DSM.sh @@ -1,5 +1,5 @@ ### DISCLAIMER: This is a third party addition to dockcheck - best effort testing. -NOTIFY_DSM_VERSION="v0.3" +NOTIFY_DSM_VERSION="v0.4" # INFO: ssmtp is deprecated - consider to use msmtp instead. # # mSMTP/sSMTP has to be installed and configured manually. @@ -10,13 +10,16 @@ NOTIFY_DSM_VERSION="v0.3" MSMTP=$(which msmtp) SSMTP=$(which ssmtp) +SENDMAIL=$(which sendmail) if [ -n "$MSMTP" ] ; then MailPkg=$MSMTP elif [ -n "$SSMTP" ] ; then MailPkg=$SSMTP +elif [ -n "$SENDMAIL" ] ; then + MailPkg=$SENDMAIL else - echo "No msmtp or ssmtp binary found in PATH: $PATH" ; exit 1 + echo "No msmtp, ssmtp or sendmail binary found in PATH: $PATH" ; exit 1 fi trigger_DSM_notification() { diff --git a/notify_templates/notify_smtp.sh b/notify_templates/notify_smtp.sh index f07588c..9cfc76c 100644 --- a/notify_templates/notify_smtp.sh +++ b/notify_templates/notify_smtp.sh @@ -1,5 +1,5 @@ ### DISCLAIMER: This is a third party addition to dockcheck - best effort testing. -NOTIFY_SMTP_VERSION="v0.3" +NOTIFY_SMTP_VERSION="v0.4" # INFO: ssmtp is depcerated - consider to use msmtp instead. # # mSMTP/sSMTP has to be installed and configured manually. @@ -15,13 +15,16 @@ fi MSMTP=$(which msmtp) SSMTP=$(which ssmtp) +SENDMAIL=$(which sendmail) if [ -n "$MSMTP" ] ; then MailPkg=$MSMTP elif [ -n "$SSMTP" ] ; then MailPkg=$SSMTP +elif [ -n "$SENDMAIL" ] ; then + MailPkg=$SENDMAIL else - echo "No msmtp or ssmtp binary found in PATH: $PATH" ; exit 1 + echo "No msmtp, ssmtp or sendmail binary found in PATH: $PATH" ; exit 1 fi trigger_smtp_notification() {