public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Watchdog] Fix broken mail with more than one rcpt in some cases
0d7681d0
data/Dockerfiles/watchdog/watchdog.sh | 9 +++++++++
1 file changed, 9 insertions(+)
Diff
diff --git a/data/Dockerfiles/watchdog/watchdog.sh b/data/Dockerfiles/watchdog/watchdog.sh
index d7bdff77..34ad86b6 100755
--- a/data/Dockerfiles/watchdog/watchdog.sh
+++ b/data/Dockerfiles/watchdog/watchdog.sh
@@ -58,6 +58,15 @@ function mail_error() {
[[ -z ${1} ]] && return 1
[[ -z ${2} ]] && BODY="Service was restarted on $(date), please check your mailcow installation." || BODY="$(date) - ${2}"
WATCHDOG_NOTIFY_EMAIL=$(echo "${WATCHDOG_NOTIFY_EMAIL}" | sed 's/"//;s|"$||')
+ # 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
IFS=',' read -r -a MAIL_RCPTS <<< "${WATCHDOG_NOTIFY_EMAIL}"
for rcpt in "${MAIL_RCPTS[@]}"; do
RCPT_DOMAIN=