Start a conversation

How to replace existing SPF records in DirectAdmin

If you want to mass change the SPF records, you can run the following command to replace an existing value or to add an extra value to your SPF record.

Add extra settings to the SPF record

If you want to add extra data to the SPF record, make sure that you also add the original_value to the replace_value. Example: if you want to add ip4: and the SPF holds ip4:, than make sure that your replace_value is ip4: ip4: .

original_value Example: ip4:
replace_value Example: ip4:

Make sure that the original_value is unique

Every occurence of the original_value will get replaced with replace_value. Make sure that the original_value only can be found in the SPF records.

Command (replace original_value and replace_value):

cd /var/named
sed -i 's/original_value/replace_value/g' *.db

Don't forget to update the serial numbers. This step is essential when your server uses our DNS cluster.

echo "action=rewrite&value=named" > /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d2000
Choose files or drag and drop files
Was this article helpful?
  1. Daniel

  2. Posted