From d5971e383bcf7934f79ac822b5c6f8a9f9300244 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sat, 10 May 2014 11:57:52 +0000 Subject: [PATCH] add ADSP and DMARC records; see #14 --- scripts/dns_update.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/dns_update.sh b/scripts/dns_update.sh index 8aa5de54..c8f99f3b 100755 --- a/scripts/dns_update.sh +++ b/scripts/dns_update.sh @@ -92,9 +92,16 @@ ns2 IN A $PUBLIC_IP EOF fi - # If OpenDKIM is set up, append the suggested TXT record to the zone. + # If OpenDKIM is set up.. if [ -f "$STORAGE_ROOT/mail/dkim/mail.txt" ]; then + # Append the DKIM TXT record to the zone as generated by OpenDKIM. cat "$STORAGE_ROOT/mail/dkim/mail.txt" >> /etc/nsd/zones/$fn2; + + # Append ADSP (RFC 5617) and DMARC records. + cat >> /etc/nsd/zones/$fn2 << EOF; +_adsp._domainkey IN TXT "dkim=all" +_dmarc IN TXT "v=DMARC1; p=quarantine" +EOF fi # Add this zone file to the main nsd configuration file.