浏览代码

Implemented Check if IPv6 is disabled

DerLinkman 3 年之前
父节点
当前提交
575eab1cf0
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      data/Dockerfiles/dovecot/docker-entrypoint.sh

+ 10 - 0
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 <<EOF > /etc/dovecot/sogo_trusted_ip.conf
 # Autogenerated by mailcow
 remote ${IPV4_NETWORK}.248 {
@@ -321,6 +322,15 @@ remote ${SOGO_V6} {
 }
 EOF
 
+else
+cat <<EOF > /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