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 centralsoft.org. 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 http://www.openspf.org/wizard.html?mydomain=&x=26&y=8. We use this wizard to create an SPF record for centralsoft.org, and add this to our zone file:

centralsoft.org.                  TXT "v=spf1 a mx ~all"
server1.centralsoft.org. TXT "v=spf1 a -all"

Putting It All Together

Now we put all these records in our zone file pri.centralsoft.org. It looks like this:

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

;
NS server1.centralsoft.org.;
NS ns0.centralsoft.org. ;

;
MX 10 server1.centralsoft.org.

;

centralsoft.org. A 70.253.158.42
www A 70.253.158.42
server1 A 70.253.158.42
ns0 A 70.253.158.45
ftp CNAME www
centralsoft.org. TXT "v=spf1 a mx ~all"
server1.centralsoft.org. 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.