Skip to main content

Update all zones with dmarc record

Comments

4 comments

  • Jcats
    You could do a echo like
    # cd /var/named ; for i in `ls -I . -I .. *.db` ; do echo "_dmarc IN TXT \"v=DMARC1; p=reject; rua=mailto:dmarc@$(echo $i | sed 's/.db//g');\"" >> $i ; done
    That's a strict dmarc though so you may want to change it, just using it as an example. You also have to bump the serial up in the dns zone.
    # find /var/named/*.db -mtime -1 -exec perl -pi -e 'if (/^\s+(\d{10})\s+;\s+serial/i) { my $i = $1+1; s/$1/$i/;}' '{}' \;
    You may also want to backup your DNS zones prior as well:
    # cp -a /var/named /var/named-bk
    As far as the template, in WHM: Home "DNS Functions "Edit Zone Templates You could add this to the standard template:
    _dmarc IN TXT "v=DMARC1; p=reject; rua=mailto:dmarc@%domain%;"
    Again, just as an example, you may want to change the actual record. Oh and don't forget to reload the zones after doing so:
    # service named reload
    0
  • samuelmf
    Thanks for reply my friend a dude As far as the template, in WHM: Home "DNS Functions "Edit Zone Templates You could add this to the standard template:
    _dmarc IN TXT "v=DMARC1; p=reject; rua=mailto:dmarc@%domain%;"
    instead use dmarc@%domain% as mail can i use a gmail account for all the accounts? the same thing for the email on the echo code. And after all that is neccesary that i use the option "Synchronize DNS Records"
    0
  • Jcats
    You can but requires more since the domain would differ from the domain within the zone, read this: HOWTO - Define a DMARC Record search for the rua= section As far as running "Synchronize DNS Records" no its not needed unless you are running a DNS cluster which it doesn't sound like you are. After you modify the DNS zones, when you run 'service named reload' this will reload all the DNS zones and nothing further is required.
    0
  • cPanelMichael
    Hello, Note that a feature request for DMARC support is open at the following URL: DMARC config in email authentication section Please feel free to vote and add feedback to this request if you would like to see official support for DMARC records integrated into cPanel. Thanks!
    0

Please sign in to leave a comment.