Recent Changes - Search:

Softwares

.

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

Main.Bash-script-to-add-SPF-DNS-entry History

Hide 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
Edit - History - Print - Recent Changes - Search
Page last modified on October 04, 2007, at 11:42 PM