Softwares |
Main /
Bash-script-to-add-SPF-DNS-entry
#!/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
|