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.