From e58538590a32022f36ff51df8a18f6bc992b33f6 Mon Sep 17 00:00:00 2001 From: UX0l0l Date: Sun, 23 Jun 2024 04:26:19 +0300 Subject: [PATCH] Made the IPv6 option in the final DNS records output optional depending on the v6choice variable defined by the user --- emailwiz.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emailwiz.sh b/emailwiz.sh index a7b959a..4bdbcdf 100644 --- a/emailwiz.sh +++ b/emailwiz.sh @@ -365,7 +365,7 @@ done pval="$(tr -d '\n' <"/etc/postfix/dkim/$domain/$subdom.txt" | sed "s/k=rsa.* \"p=/k=rsa; p=/;s/\"\s*\"//;s/\"\s*).*//" | grep -o 'p=.*')" dkimentry="$subdom._domainkey.$domain TXT v=DKIM1; k=rsa; $pval" dmarcentry="_dmarc.$domain TXT v=DMARC1; p=reject; rua=mailto:postmaster@$domain; fo=1" -spfentry="$domain TXT v=spf1 mx a:$maildomain ip4:$ipv4 ip6:$ipv6 -all" +spfentry="$domain TXT v=spf1 mx a:$maildomain ip4:$ipv4 $( [ "${v6choice#n}" ] && printf 'ip6:%s' "$ipv6" ) -all" mxentry="$domain MX 10 $maildomain 300" useradd -m -G mail postmaster