Traditional DNS Howto - Page 6

TXT Records

TXT records give you the ability to assign some text/additional information to a zone. Normally this feature is not much in use - with one exception: SPF (Sender Policy Framework) records. These are records that specify from which machines you are allowed to send mail with the sender domain Technically, you can send such mails from any machine, but big email providers such as Yahoo or Hotmail now make heavy usage of SPF records, i.e.: if the sender domain does not have an SPF record or is sending from a machine that is not listed in the SPF record, then the mail is classified as spam.

There is a wizard for creating SPF records at We use this wizard to create an SPF record for, and add this to our zone file:                  TXT "v=spf1 a mx ~all" TXT "v=spf1 a -all"

Putting It All Together

Now we put all these records in our zone file It looks like this:

@ IN SOA root.localhost. (
2006012103; serial
28800; refresh, seconds
7200; retry, seconds
604800; expire, seconds
86400 ); minimum, seconds

NS ;

MX 10

; A
www A
server1 A
ns0 A
ftp CNAME www TXT "v=spf1 a mx ~all" TXT "v=spf1 a -all"

Share this page:

2 Comment(s)

Add comment


From: Anonymous

This article is actually good, even if you only want to know about how DNS works.

Thank you.

From: Son Nguyen

One billion thanks to author!
This is a very very very useful article.