[Watchdog] Fix for fix for wrong mails

master
andryyy 2019-06-10 21:53:44 +02:00
parent 84307e85f2
commit 7f6acdb791
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 1 additions and 10 deletions

View File

@ -77,15 +77,6 @@ function mail_error() {
log_msg "Cannot determine MX for ${rcpt}, skipping email notification..." log_msg "Cannot determine MX for ${rcpt}, skipping email notification..."
return 1 return 1
fi fi
# Some exceptions for subject and body formats
if [[ ${1} == "watchdog-mailcow" ]]; then
SUBJECT="Watchdog started"
elif [[ ${1} == "fail2ban" ]]; then
SUBJECT="${BODY}"
BODY="Please see netfilter-mailcow for more details and triggered rules."
else
SUBJECT="Watchdog: ${1} triggered an event"
fi
[ -f "/tmp/${1}" ] && ATTACH="--attach /tmp/${1}@text/plain" || ATTACH= [ -f "/tmp/${1}" ] && ATTACH="--attach /tmp/${1}@text/plain" || ATTACH=
./smtp-cli --missing-modules-ok \ ./smtp-cli --missing-modules-ok \
--subject="${SUBJECT}" \ --subject="${SUBJECT}" \

View File

@ -364,7 +364,7 @@ services:
- /lib/modules:/lib/modules:ro - /lib/modules:/lib/modules:ro
watchdog-mailcow: watchdog-mailcow:
image: mailcow/watchdog:1.44 image: mailcow/watchdog:1.45
# Debug # Debug
#command: /watchdog.sh #command: /watchdog.sh
build: ./data/Dockerfiles/watchdog build: ./data/Dockerfiles/watchdog