Merge pull request #388 from mkuron/cname
ACME: support CNAME in domain checks
This commit is contained in:
commit
11a2f1d1b0
@ -53,7 +53,7 @@ while true; do
|
|||||||
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" -Bs)
|
||||||
|
|
||||||
for SQL_DOMAIN in "${SQL_DOMAIN_ARR[@]}"; do
|
for SQL_DOMAIN in "${SQL_DOMAIN_ARR[@]}"; do
|
||||||
A_CONFIG=$(dig A autoconfig.${SQL_DOMAIN} +short)
|
A_CONFIG=$(dig A autoconfig.${SQL_DOMAIN} +short | tail -n 1)
|
||||||
if [[ ! -z ${A_CONFIG} ]]; then
|
if [[ ! -z ${A_CONFIG} ]]; then
|
||||||
echo "Found A record for autoconfig.${SQL_DOMAIN}: ${A_CONFIG}"
|
echo "Found A record for autoconfig.${SQL_DOMAIN}: ${A_CONFIG}"
|
||||||
if [[ ${IPV4} == ${A_CONFIG} ]]; then
|
if [[ ${IPV4} == ${A_CONFIG} ]]; then
|
||||||
@ -66,7 +66,7 @@ while true; do
|
|||||||
echo "No A record for autoconfig.${SQL_DOMAIN} found"
|
echo "No A record for autoconfig.${SQL_DOMAIN} found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
A_DISCOVER=$(dig A autodiscover.${SQL_DOMAIN} +short)
|
A_DISCOVER=$(dig A autodiscover.${SQL_DOMAIN} +short | tail -n 1)
|
||||||
if [[ ! -z ${A_DISCOVER} ]]; then
|
if [[ ! -z ${A_DISCOVER} ]]; then
|
||||||
echo "Found A record for autodiscover.${SQL_DOMAIN}: ${A_CONFIG}"
|
echo "Found A record for autodiscover.${SQL_DOMAIN}: ${A_CONFIG}"
|
||||||
if [[ ${IPV4} == ${A_DISCOVER} ]]; then
|
if [[ ${IPV4} == ${A_DISCOVER} ]]; then
|
||||||
@ -81,7 +81,7 @@ while true; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
for SAN in "${ADDITIONAL_SAN_ARR[@]}"; do
|
for SAN in "${ADDITIONAL_SAN_ARR[@]}"; do
|
||||||
A_SAN=$(dig A ${SAN} +short)
|
A_SAN=$(dig A ${SAN} +short | tail -n 1)
|
||||||
if [[ ! -z ${A_SAN} ]]; then
|
if [[ ! -z ${A_SAN} ]]; then
|
||||||
echo "Found A record for ${SAN}: ${A_SAN}"
|
echo "Found A record for ${SAN}: ${A_SAN}"
|
||||||
if [[ ${IPV4} == ${A_SAN} ]]; then
|
if [[ ${IPV4} == ${A_SAN} ]]; then
|
||||||
|
@ -284,7 +284,7 @@ services:
|
|||||||
acme-mailcow:
|
acme-mailcow:
|
||||||
depends_on:
|
depends_on:
|
||||||
- nginx-mailcow
|
- nginx-mailcow
|
||||||
image: mailcow/acme:1.1
|
image: mailcow/acme:1.2
|
||||||
build: ./data/Dockerfiles/acme
|
build: ./data/Dockerfiles/acme
|
||||||
dns:
|
dns:
|
||||||
- 172.22.1.254
|
- 172.22.1.254
|
||||||
|
Loading…
Reference in New Issue
Block a user