Take the 2-minute tour ×

Where I can create/insert the SPF rules to allow a external server to authenticate and send e-mails using the domain name of my server running Ubuntu?

I need to insert this rule:

v=spf1 ip4:  ip4: a mx ~all

Thanks :)

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

As Devin says, first step is to figure out where the nameservers are for your domain, using the dig command he's given.

If you aren't the owner/admin of the server that's named as authoritative for your domain, you need to contact the person who is the admin.

If you are the admin, then the nameserver program would normally be Bind, and the configuration file for it would normally be:


That file, named.conf will contain a few lines that tell you where the data for your domain goes. Look for something like:

zone "example.com" IN {
  type master;
  file "example.com.zone";
  allow-update { none; };

The critical line is file "example.com.zone" That tells you that the data on the domain example.com is in the text file:


Then, you edit the example.com.zone file and add a line for your SPF record:

example.com.  TXT  "v=spf1 ip4:  ip4: a mx ~all"
share|improve this answer
Thank you! I can't find the file of domain data but I understood what is this SPF... :) –  TiuTalk Mar 27 '10 at 11:24
add comment

SPF rules go in the dns rcord for the domain, which may ir may not be runnng on the same server. If you didn't set up Bind, ("named") your dns records are probably elsewhere.

dig example.com ns

should show the name servers

share|improve this answer
But where I can find/edit this DNS rules? I just need the file name & location to start understanding wtf is this SPF.. :/ –  TiuTalk Mar 27 '10 at 3:57
add comment

Your Answer


