From 1c15133a522f435e954aa27a010b80cd222d81b5 Mon Sep 17 00:00:00 2001 From: Malte Jesgarzewsky Date: Fri, 2 Sep 2022 19:22:48 +0200 Subject: [PATCH 1/5] Modified branch switch in generate_config.sh Added possibility to define the mailcow branch by an environment variable to be able to bypass input. --- generate_config.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/generate_config.sh b/generate_config.sh index afd1d892..ed68f0cd 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -141,7 +141,9 @@ echo "Available Branches:" echo "- master branch (stable updates) | default, recommended [1]" echo "- nightly branch (unstable updates, testing) | not-production ready [2]" sleep 1 -read -r -p "Choose the Branch with it´s number [1/2] " branch + +while [ -z "${MAILCOW_BRANCH}" ]; do + read -r -p "Choose the Branch with it´s number [1/2] " branch case $branch in [2]) git_branch="nightly" @@ -150,6 +152,11 @@ read -r -p "Choose the Branch with it´s number [1/2] " branch git_branch="master" ;; esac +done + +if [ ! -z "${MAILCOW_BRANCH}" ]; then + git_branch=${MAILCOW_BRANCH} +fi git fetch --all git checkout -f $git_branch @@ -458,4 +465,4 @@ else echo ' $MAILCOW_UPDATEDAT='$(date +%s)';' >> data/web/inc/app_info.inc.php echo '?>' >> data/web/inc/app_info.inc.php echo -e "\e[33mCannot determine current git repository version...\e[0m" -fi \ No newline at end of file +fi From b5f5b53e37dcc4babca8e5e383c1b11292391709 Mon Sep 17 00:00:00 2001 From: Malte Jesgarzewsky Date: Mon, 5 Sep 2022 09:41:19 +0200 Subject: [PATCH 2/5] Update generate_config.sh Fixed bug in loop by replacing the variable. --- generate_config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate_config.sh b/generate_config.sh index ed68f0cd..70dc5887 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -146,10 +146,10 @@ while [ -z "${MAILCOW_BRANCH}" ]; do read -r -p "Choose the Branch with it´s number [1/2] " branch case $branch in [2]) - git_branch="nightly" + MAILCOW_BRANCH="nightly" ;; *) - git_branch="master" + MAILCOW_BRANCH="master" ;; esac done From 72e204f8fdec80ef4692a070bff35b6c8645d57d Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Thu, 8 Sep 2022 10:32:07 +0200 Subject: [PATCH 3/5] fix sogo bugs after 2022-08 update --- data/Dockerfiles/dovecot/docker-entrypoint.sh | 16 ---------------- data/Dockerfiles/sogo/bootstrap-sogo.sh | 4 ++++ data/conf/sogo/sogo.conf | 2 -- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/data/Dockerfiles/dovecot/docker-entrypoint.sh b/data/Dockerfiles/dovecot/docker-entrypoint.sh index aa1aa0ae..18746deb 100755 --- a/data/Dockerfiles/dovecot/docker-entrypoint.sh +++ b/data/Dockerfiles/dovecot/docker-entrypoint.sh @@ -307,29 +307,13 @@ namespace { } 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 { - disable_plaintext_auth = no -} - -remote ${SOGO_V6} { - disable_plaintext_auth = no -} -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) diff --git a/data/Dockerfiles/sogo/bootstrap-sogo.sh b/data/Dockerfiles/sogo/bootstrap-sogo.sh index 04472dfd..6dac55a9 100755 --- a/data/Dockerfiles/sogo/bootstrap-sogo.sh +++ b/data/Dockerfiles/sogo/bootstrap-sogo.sh @@ -142,6 +142,10 @@ cat < /var/lib/sogo/GNUstep/Defaults/sogod.plist mysql://${DBUSER}:${DBPASS}@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/${DBNAME}/sogo_acl SOGoIMAPServer imap://${IPV4_NETWORK}.250:143/?TLS=YES&tlsVerifyMode=none + SOGoSieveServer + sieve://${IPV4_NETWORK}.250:4190/?TLS=YES&tlsVerifyMode=none + SOGoSMTPServer + smtp://${IPV4_NETWORK}.253:588/?TLS=YES&tlsVerifyMode=none SOGoTrustProxyAuthentication YES SOGoEncryptionKey diff --git a/data/conf/sogo/sogo.conf b/data/conf/sogo/sogo.conf index 1d6a9d3f..97a34e9e 100644 --- a/data/conf/sogo/sogo.conf +++ b/data/conf/sogo/sogo.conf @@ -32,8 +32,6 @@ // ); // self-signed is not trusted anymore - SOGoSieveServer = "sieve://dovecot:4190/?TLS=YES&tlsVerifyMode=none"; - SOGoSMTPServer = "smtp://postfix:588/?TLS=YES&tlsVerifyMode=none"; WOPort = "0.0.0.0:20000"; SOGoMemcachedHost = "memcached"; From 7c44375223bdf25e8dc50062d0ec757f3040e51d Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Thu, 8 Sep 2022 10:35:03 +0200 Subject: [PATCH 4/5] increase dovecot and sogo image version --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9fbfef59..ad78670d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -168,7 +168,7 @@ services: - phpfpm sogo-mailcow: - image: mailcow/sogo:1.110 + image: mailcow/sogo:1.111 environment: - DBNAME=${DBNAME} - DBUSER=${DBUSER} @@ -215,7 +215,7 @@ services: - sogo dovecot-mailcow: - image: mailcow/dovecot:1.18 + image: mailcow/dovecot:1.19 depends_on: - mysql-mailcow dns: From 8f6099e3e4044e60e8f966ed5f29f840aee2bd8e Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Thu, 8 Sep 2022 11:02:52 +0200 Subject: [PATCH 5/5] add & to smtp url --- data/Dockerfiles/sogo/bootstrap-sogo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/Dockerfiles/sogo/bootstrap-sogo.sh b/data/Dockerfiles/sogo/bootstrap-sogo.sh index 6dac55a9..aa15525c 100755 --- a/data/Dockerfiles/sogo/bootstrap-sogo.sh +++ b/data/Dockerfiles/sogo/bootstrap-sogo.sh @@ -145,7 +145,7 @@ cat < /var/lib/sogo/GNUstep/Defaults/sogod.plist SOGoSieveServer sieve://${IPV4_NETWORK}.250:4190/?TLS=YES&tlsVerifyMode=none SOGoSMTPServer - smtp://${IPV4_NETWORK}.253:588/?TLS=YES&tlsVerifyMode=none + smtp://${IPV4_NETWORK}.253:588/?TLS=YES&tlsVerifyMode=none SOGoTrustProxyAuthentication YES SOGoEncryptionKey