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] Send mail when starting [Compose] Update watchdog and remove oom check for compatibility
5be4885c
data/Dockerfiles/watchdog/Dockerfile | 1 +
data/Dockerfiles/watchdog/watchdog.sh | 6 +++++-
docker-compose.yml | 4 ++--
3 files changed, 8 insertions(+), 3 deletions(-)
Diff
diff --git a/data/Dockerfiles/watchdog/Dockerfile b/data/Dockerfiles/watchdog/Dockerfile
index 7ab29b68..96c8976c 100644
--- a/data/Dockerfiles/watchdog/Dockerfile
+++ b/data/Dockerfiles/watchdog/Dockerfile
@@ -12,6 +12,7 @@ RUN apk add --update \
coreutils \
jq \
fcgi \
+ openssl \
nagios-plugins-mysql \
nagios-plugins-dns \
nagios-plugins-disk \
diff --git a/data/Dockerfiles/watchdog/watchdog.sh b/data/Dockerfiles/watchdog/watchdog.sh
index f56d3c4c..a5d37617 100755
--- a/data/Dockerfiles/watchdog/watchdog.sh
+++ b/data/Dockerfiles/watchdog/watchdog.sh
@@ -58,9 +58,10 @@ function mail_error() {
log_msg "Cannot determine MX for ${rcpt}, skipping email notification..."
return 1
fi
+ [[ ${1} == "watchdog-mailcow" ]] && SUBJECT="Watchdog started" || SUBJECT="Watchdog: ${1} hit the error rate limit"
[ -f "/tmp/${1}" ] && ATTACH="--attach /tmp/${1}@text/plain" || ATTACH=
./smtp-cli --missing-modules-ok \
- --subject="Watchdog: ${1} hit the error rate limit" \
+ --subject="${SUBJECT}" \
--body-plain="${BODY}" \
--to=${rcpt} \
--from="watchdog@${MAILCOW_HOSTNAME}" \
@@ -447,6 +448,9 @@ Empty
return 1
}
+# Notify about start
+[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "watchdog-mailcow" "Watchdog started monitoring mailcow."
+
# Create watchdog agents
(
while true; do
diff --git a/docker-compose.yml b/docker-compose.yml
index 2a60c029..804ba749 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -359,14 +359,14 @@ services:
- /lib/modules:/lib/modules:ro
watchdog-mailcow:
- image: mailcow/watchdog:1.40
+ image: mailcow/watchdog:1.41
# Debug
#command: /watchdog.sh
build: ./data/Dockerfiles/watchdog
- oom_kill_disable: true
volumes:
- rspamd-vol-1:/var/lib/rspamd
- mysql-socket-vol-1:/var/run/mysqld/
+ - ./data/assets/ssl:/etc/ssl/mail/:ro
restart: always
environment:
- LOG_LINES=${LOG_LINES:-9999}