Author Topic: [directadmin] add dmarc record automatic for all new domain  (Read 2953 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
[directadmin] add dmarc record automatic for all new domain
« on: พฤษภาคม 12, 2019, 04:24:18 PM »
I wish to automate new DMARC records for all new domains
https://help.directadmin.com/item.php?id=596

If you like the above setup, and you want to automate it's addition to all new dns zones, you can run the following:
cd /usr/local/directadmin/data/templates/custom
cp ../dns_txt.conf .

and then add the record you want to the bottom of the custom/dns_txt.conf by running this command:
echo '_dmarc="v=DMARC1; p=none; sp=none; rua=mailto:spam-reports@|DOMAIN|"' >> dns_txt.conf

keeping in mind that this assumes you've got a spam-reports account created already.