Softwares |
Main /
Bash-script-to-add-SPF-DNS-entryMain.Bash-script-to-add-SPF-DNS-entry HistoryHide minor edits - Show changes to output Changed line 12 from:
echo $i. IN TXT "v=spf1 a mx ~all" >> $i.db; to:
echo $i. IN TXT "\"v=spf1 a mx ~all"\" >> $i.db; Added lines 1-14:
*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 |