Recent Changes - Search:

Softwares

.

Bash-script-to-add-SPF-DNS-entry

  • Append SPF record to DNS db files.
  #!/bin/bash
  #adding spf record to DNS db file that already exists.
  #copy and paste this file to /var/named and then run the script.
  #Make sure you append to the db file.
  files=`ls *.db | sed "s/.db//"`;
  for i in $files;
  do if grep -l spf1 $i.db > /dev/null;
  then echo "I am Skipping $i.db";
  else echo "I am Modifying $i.db";
  echo $i. IN TXT "\"v=spf1 a mx ~all"\" >> $i.db;
  fi
  done

Edit - History - Print - Recent Changes - Search
Page last modified on February 16, 2018, at 03:53 AM