Traditional DNS Howto - Page 6

Want to support HowtoForge? Become a subscriber!
Submitted by taft (Contact Author) (Forums) on Sun, 2006-03-12 10:55. ::

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"

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Son Nguyen (not registered) on Wed, 2012-07-04 11:20.
One billion thanks to author!
This is a very very very useful article.
Submitted by Anonymous (not registered) on Mon, 2009-12-14 23:05.

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

Thank you.