1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-14 10:52:49 +02:00

[ACME, Compose] Add new image; fix AAAA check for ADDITIONAL_SAN

This commit is contained in:
André 2018-06-27 12:09:51 +02:00
parent 8adf3d27db
commit 729bba5b57
2 changed files with 15 additions and 6 deletions

View File

@ -242,16 +242,25 @@ while true; do
continue continue
fi fi
A_SAN=$(dig A ${SAN} +short | tail -n 1) A_SAN=$(dig A ${SAN} +short | tail -n 1)
if [[ ! -z ${A_SAN} ]]; then AAAA_SAN=$(dig AAAA ${SAN} +short | tail -n 1)
if [[ ! -z ${AAAA_SAN} ]]; then
log_f "Found AAAA record for ${SAN}: ${AAAA_SAN} - skipping A record check"
if [[ $(expand ${IPV6:-"0000:0000:0000:0000:0000:0000:0000:0000"}) == $(expand ${AAAA_SAN}) ]] || [[ ${SKIP_IP_CHECK} == "y" ]]; then
log_f "Confirmed AAAA record ${SAN}"
ADDITIONAL_VALIDATED_SAN=${SAN}
else
log_f "Cannot match your IP ${IPV6:-NO_IPV6_LINK} against hostname ${SAN} ($(expand ${AAAA_SAN}))"
fi
elif [[ ! -z ${A_SAN} ]]; then
log_f "Found A record for ${SAN}: ${A_SAN}" log_f "Found A record for ${SAN}: ${A_SAN}"
if [[ ${IPV4:-ERR} == ${A_SAN} ]] || [[ ${SKIP_IP_CHECK} == "y" ]]; then if [[ ${IPV4:-ERR} == ${A_SAN} ]] || [[ ${SKIP_IP_CHECK} == "y" ]]; then
log_f "Confirmed A record ${SAN}" log_f "Confirmed A record ${A_SAN}"
ADDITIONAL_VALIDATED_SAN+=("${SAN}") ADDITIONAL_VALIDATED_SAN=${SAN}
else else
log_f "Cannot match your IP against hostname ${SAN}" log_f "Cannot match your IP ${IPV4} against hostname ${SAN} (${A_SAN})"
fi fi
else else
log_f "No A record for ${SAN} found" log_f "No A or AAAA record found for hostname ${SAN}"
fi fi
done done

View File

@ -297,7 +297,7 @@ services:
depends_on: depends_on:
- nginx-mailcow - nginx-mailcow
- mysql-mailcow - mysql-mailcow
image: mailcow/acme:1.30 image: mailcow/acme:1.31
build: ./data/Dockerfiles/acme build: ./data/Dockerfiles/acme
sysctls: sysctls:
- net.ipv6.conf.all.disable_ipv6=${SYSCTL_IPV6_DISABLED:-0} - net.ipv6.conf.all.disable_ipv6=${SYSCTL_IPV6_DISABLED:-0}