From 0dcfac8f15c4541c571e7558d7d9c317844e4d91 Mon Sep 17 00:00:00 2001 From: Peter Date: Thu, 18 Aug 2022 19:06:54 +0200 Subject: [PATCH 1/3] Update SOGo to 5.7.1 --- data/Dockerfiles/sogo/Dockerfile | 6 +++--- docker-compose.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/Dockerfiles/sogo/Dockerfile b/data/Dockerfiles/sogo/Dockerfile index 72f7d816c..f08600ac3 100644 --- a/data/Dockerfiles/sogo/Dockerfile +++ b/data/Dockerfiles/sogo/Dockerfile @@ -2,7 +2,7 @@ FROM debian:bullseye-slim LABEL maintainer "Andre Peters " ARG DEBIAN_FRONTEND=noninteractive -ARG SOGO_DEBIAN_REPOSITORY=http://packages.inverse.ca/SOGo/nightly/5/debian/ +ARG SOGO_DEBIAN_REPOSITORY=http://packages.sogo.nu/nightly/5/debian/ ENV LC_ALL C ENV GOSU_VERSION 1.14 @@ -30,7 +30,7 @@ RUN echo "Building from repository $SOGO_DEBIAN_REPOSITORY" \ && gosu nobody true \ && mkdir /usr/share/doc/sogo \ && touch /usr/share/doc/sogo/empty.sh \ - && apt-key adv --keyserver keyserver.ubuntu.com --recv-key 0x810273C4 \ + && apt-key adv --keyserver keys.openpgp.org --recv-key 74FFC6D72B925A34B5D356BDF8A27B36A6E2EAE9 \ && echo "deb ${SOGO_DEBIAN_REPOSITORY} bullseye bullseye" > /etc/apt/sources.list.d/sogo.list \ && apt-get update && apt-get install -y --no-install-recommends \ sogo \ @@ -52,4 +52,4 @@ RUN chmod +x /bootstrap-sogo.sh \ ENTRYPOINT ["/docker-entrypoint.sh"] -CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf +CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 9d5f9473f..9fbfef591 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -168,7 +168,7 @@ services: - phpfpm sogo-mailcow: - image: mailcow/sogo:1.109 + image: mailcow/sogo:1.110 environment: - DBNAME=${DBNAME} - DBUSER=${DBUSER} From 7a23e4fd4e02df90dd8ac0fe7968f47fda6839cf Mon Sep 17 00:00:00 2001 From: DerLinkman Date: Wed, 24 Aug 2022 12:12:41 +0200 Subject: [PATCH 2/3] Fix for Sieve error (due to IPv6 Comp from SOGo) --- data/Dockerfiles/dovecot/docker-entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/data/Dockerfiles/dovecot/docker-entrypoint.sh b/data/Dockerfiles/dovecot/docker-entrypoint.sh index ac7aeb1d8..801d422ac 100755 --- a/data/Dockerfiles/dovecot/docker-entrypoint.sh +++ b/data/Dockerfiles/dovecot/docker-entrypoint.sh @@ -307,11 +307,18 @@ namespace { } EOF +# Get SOGo IPv6 from Dig +SOGO_V6=$(dig +answer sogo AAAA +short) + cat < /etc/dovecot/sogo_trusted_ip.conf # Autogenerated by mailcow remote ${IPV4_NETWORK}.248 { disable_plaintext_auth = no } + +remote ${SOGO_V6} { + disable_plaintext_auth = no +} EOF # Create random master Password for SOGo SSO From 575eab1cf02d5ef75a86df4fd400d595dd14c113 Mon Sep 17 00:00:00 2001 From: DerLinkman Date: Wed, 24 Aug 2022 12:26:14 +0200 Subject: [PATCH 3/3] Implemented Check if IPv6 is disabled --- data/Dockerfiles/dovecot/docker-entrypoint.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/data/Dockerfiles/dovecot/docker-entrypoint.sh b/data/Dockerfiles/dovecot/docker-entrypoint.sh index 801d422ac..aa1aa0ae1 100755 --- a/data/Dockerfiles/dovecot/docker-entrypoint.sh +++ b/data/Dockerfiles/dovecot/docker-entrypoint.sh @@ -310,6 +310,7 @@ EOF # Get SOGo IPv6 from Dig SOGO_V6=$(dig +answer sogo AAAA +short) +if [ $SOGO_V6 ]; then cat < /etc/dovecot/sogo_trusted_ip.conf # Autogenerated by mailcow remote ${IPV4_NETWORK}.248 { @@ -321,6 +322,15 @@ remote ${SOGO_V6} { } EOF +else +cat < /etc/dovecot/sogo_trusted_ip.conf +# Autogenerated by mailcow +remote ${IPV4_NETWORK}.248 { + disable_plaintext_auth = no +} +EOF +fi + # 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