From 6b8d50b0c6df99cc8bb90e564436fc724e1c3a74 Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 16 Mar 2023 11:46:09 +0100 Subject: [PATCH] create_master_zone_file.sh: comment out SPF record if no mx record is requested. --- create_master_zone_file.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/create_master_zone_file.sh b/create_master_zone_file.sh index 976cfd1..a2c9683 100755 --- a/create_master_zone_file.sh +++ b/create_master_zone_file.sh @@ -733,6 +733,11 @@ EOF if [[ -n "$MX_HOST_2" ]] ; then cat << EOF >> "${ZONE_FILE_MASTER_DIR}/${DOMAIN}.zone" @ IN MX 10 ${MX_HOST_2}. + +; +; TXT (u.a. SPF) +; +@ IN TXT "v=spf1 a mx -all" EOF fi elif [[ -n "${DEFAULT_MX_HOST_1}" ]] ; then @@ -742,16 +747,16 @@ elif [[ -n "${DEFAULT_MX_HOST_1}" ]] ; then ; ;@ IN MX 10 ${MX_HOST_1}. + +; +; TXT (u.a. SPF) +; +;@ IN TXT "v=spf1 a mx -all" EOF fi cat << EOF >> "${ZONE_FILE_MASTER_DIR}/${DOMAIN}.zone" -; -; TXT -; -@ IN TXT "v=spf1 a mx -all" - ; ; IPv4 Hostaddresses ;