From 29c69909302bf7c47e938eb03ecd676c0a798cff Mon Sep 17 00:00:00 2001 From: Phoenix Eve Aspacio Date: Sun, 13 Aug 2017 11:46:24 +0800 Subject: [PATCH 1/2] Init Redis Connection in Autodiscover --- data/web/autodiscover.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/web/autodiscover.php b/data/web/autodiscover.php index fd8cd641..061acb61 100644 --- a/data/web/autodiscover.php +++ b/data/web/autodiscover.php @@ -7,6 +7,10 @@ if(file_exists('inc/vars.local.inc.php')) { } $configuration = array_merge($default_autodiscover_config, $autodiscover_config); +// Redis +$redis = new Redis(); +$redis->connect('redis-mailcow', 6379); + error_reporting(0); $data = trim(file_get_contents("php://input")); From 095cb05ad695cd14e6ab5c3119a799c4eb29b992 Mon Sep 17 00:00:00 2001 From: starwars108 Date: Thu, 17 Aug 2017 17:26:19 +0200 Subject: [PATCH 2/2] #511 change SQL statement --- data/Dockerfiles/acme/docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/Dockerfiles/acme/docker-entrypoint.sh b/data/Dockerfiles/acme/docker-entrypoint.sh index b8098a14..ff2429ae 100755 --- a/data/Dockerfiles/acme/docker-entrypoint.sh +++ b/data/Dockerfiles/acme/docker-entrypoint.sh @@ -79,7 +79,7 @@ while true; do while read line; do SQL_DOMAIN_ARR+=("${line}") - done < <(mysql -h mysql-mailcow -u ${DBUSER} -p${DBPASS} ${DBNAME} -e "SELECT domain FROM domain" -Bs) + done < <(mysql -h mysql-mailcow -u ${DBUSER} -p${DBPASS} ${DBNAME} -e "SELECT domain FROM domain WHERE backupmx=0" -Bs) for SQL_DOMAIN in "${SQL_DOMAIN_ARR[@]}"; do A_CONFIG=$(dig A autoconfig.${SQL_DOMAIN} +short | tail -n 1)