From 6ec1e357c3027a39cb3016f36ba1e56295205919 Mon Sep 17 00:00:00 2001 From: Niklas Meyer Date: Tue, 5 Nov 2024 16:21:14 +0100 Subject: [PATCH] fix: broken sogo cron notifications (for appointments etc.) (#6128) --- .gitignore | 1 + data/Dockerfiles/dovecot/docker-entrypoint.sh | 2 ++ docker-compose.yml | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e25639a70..b22abfd6e 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ data/conf/rspamd/override.d/* data/conf/sogo/custom-theme.js data/conf/sogo/plist_ldap data/conf/sogo/sieve.creds +data/conf/sogo/cron.creds data/conf/sogo/sogo-full.svg data/gitea/ data/gogs/ diff --git a/data/Dockerfiles/dovecot/docker-entrypoint.sh b/data/Dockerfiles/dovecot/docker-entrypoint.sh index 35c4691c5..55eed7956 100755 --- a/data/Dockerfiles/dovecot/docker-entrypoint.sh +++ b/data/Dockerfiles/dovecot/docker-entrypoint.sh @@ -371,6 +371,8 @@ EOF # Create random master Password for SOGo SSO RAND_PASS=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1) echo -n ${RAND_PASS} > /etc/phpfpm/sogo-sso.pass +# Creating additional creds file for SOGo notify crons (calendars, etc) +echo -n ${RAND_USER}@mailcow.local:${RAND_PASS} > /etc/sogo/cron.creds cat < /etc/dovecot/sogo-sso.conf # Autogenerated by mailcow passdb { diff --git a/docker-compose.yml b/docker-compose.yml index 4e7bfb2ed..c462ba88c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -211,9 +211,9 @@ services: ofelia.job-exec.sogo_sessions.schedule: "@every 1m" ofelia.job-exec.sogo_sessions.command: "/bin/bash -c \"[[ $${MASTER} == y ]] && /usr/local/bin/gosu sogo /usr/sbin/sogo-tool -v expire-sessions $${SOGO_EXPIRE_SESSION} || exit 0\"" ofelia.job-exec.sogo_ealarms.schedule: "@every 1m" - ofelia.job-exec.sogo_ealarms.command: "/bin/bash -c \"[[ $${MASTER} == y ]] && /usr/local/bin/gosu sogo /usr/sbin/sogo-ealarms-notify -p /etc/sogo/sieve.creds || exit 0\"" + ofelia.job-exec.sogo_ealarms.command: "/bin/bash -c \"[[ $${MASTER} == y ]] && /usr/local/bin/gosu sogo /usr/sbin/sogo-ealarms-notify -p /etc/sogo/cron.creds || exit 0\"" ofelia.job-exec.sogo_eautoreply.schedule: "@every 5m" - ofelia.job-exec.sogo_eautoreply.command: "/bin/bash -c \"[[ $${MASTER} == y ]] && /usr/local/bin/gosu sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds || exit 0\"" + ofelia.job-exec.sogo_eautoreply.command: "/bin/bash -c \"[[ $${MASTER} == y ]] && /usr/local/bin/gosu sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/cron.creds || exit 0\"" ofelia.job-exec.sogo_backup.schedule: "@every 24h" ofelia.job-exec.sogo_backup.command: "/bin/bash -c \"[[ $${MASTER} == y ]] && /usr/local/bin/gosu sogo /usr/sbin/sogo-tool backup /sogo_backup ALL || exit 0\"" restart: always