Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 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 "" IN {
  type master;
  file "";
  allow-update { none; };

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


Then, you edit the file and add a line for your SPF record:  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

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 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.