DNS and SPF updating

ReN

Verified User
Joined
Jul 2, 2005
Messages
185
Greetings guys, i'd like to make server wide dns SPF record adjustments and at a loss on how this would be done exactly , any help or suggestions would be great.

ReN
 
Logged in through the shell, as root, run a one-line edit command to change the current lines to whatever you want.

Then run the DirectAdmin command to update the zone files and restart DNS.

Don't just restart BIND; that won't update the serial numbers so slave servers won't ever pick up the changes.

Jeff

Jeff
 
errr ok, so basically the only way this can be done is to manually edit every single zone file for each domain?
 
errr ok, so basically the only way this can be done is to manually edit every single zone file for each domain?

Go to /var/named
perl -pi -e 's/oldspfdata/newspfdata/i' *.db

Be aware; this only is all servials are exactly the same.
Always backup your old *.db files! Also, rewrite the values, so the serial gets updated. This kan be done by the echo tally command?
 
Go to /var/named
perl -pi -e 's/oldspfdata/newspfdata/i' *.db

Be aware; this only is all servials are exactly the same.
Always backup your old *.db files! Also, rewrite the values, so the serial gets updated. This kan be done by the echo tally command?

Greetings ,

executed the command as per your suggestion , nothing happened at all - did as per the example below

perl -pi -e 's/"v=spf1 a mx ip4:(serverip) ?all"/"v=spf1 a mx ip4:(serverip) ~all"/i' *.db


Am i missing something??
 
Greetings ,

executed the command as per your suggestion , nothing happened at all - did as per the example below

perl -pi -e 's/"v=spf1 a mx ip4:(serverip) ?all"/"v=spf1 a mx ip4:(serverip) ~all"/i' *.db


Am i missing something??

Try this
Code:
perl -pi -e 's#v=spf1 a mx ip4:serverip \?all#v=spf1 a mx ip4:serverip \~all#' *.db
 
That looks like it did it Smtalk , thanx very much for everyones assistance.
 
Just an update for those interested, after the adjustments have been made you need to rewrite the DNS serials and restart your dns server. The command below will redo all the serials for you .

echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue

Not sure if this restarts named, incase it doesn't:-

/usr/local/etc/rc.d/named restart
 
I believe it does the restart. You can always check; wait a minute (it takes up to a minute for jobs in the task.queue to be run) and then check the /var/log/messages file to see if named has been restarted in the last minute.

Jeff
 
And if you don't like to wait a minute:
Code:
/usr/local/directadmin/dataksq d
 
It takes a new job (if it's set is task.queue), and if it's not - it does nothing (because nothing is on task.queue file). It's executed every minute, and I'm sure some servers has few jobs running at the same time (because it could start a job that could take more than 1 minute (tally or something like that)).
 
Back
Top