Swap all TXT/SPF records from ~all to -all

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » DNS

Swap all TXT/SPF records from ~all to -allLast Modified: May 9, 2015, 7:22 pm
In an attempt to lower your spam score, using the forceful -all SPF value instead of the neutral ~all is one simple way of doing this.  However, as -all is enforced, it means that all of your clients who send on a domain using -all MUST use your server to send their email, and cannot send email through their own IPs, unless you include their SPF settings in the dns record.

1) Future Domains

To use the -all format for all future domains, not yet created, type:

cd /usr/local/directadmin/data/templates/custom
cp ../dns_txt.conf .
cp ../dns_spf.conf .

Then edit both of these files, and change ~all to -all.

2) Existing Domains

To swap all existing domains to the -all format, where the zones are in , you'd type:

cp -f /var/named /var/named.backup
cd /var/named
perl -pi -e 's/\~all/\-all/' *.db

where you'd want to absolutely ensure that you have a backup of the /var/named directory, in case the perl regex does something unexpected.

For FreeBSD, use /etc/namedb.
For Debian, use /etc/bind.

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST