Personal wiki of Goran Jurić


DNS records

This article is outdated. Updated version on building a mail server on Debian 6 is published as a free eBook here.

Note: Server in this example is named

First, we need to check our hostname

atlantis:~# hostname -f

If hostname did not return FQDN of your server edit /etc/hosts. You should see something like this, if not, change according to your IP address and server name.         localhost
YOUR-IP-ADDRESS    atlantis

Now check your /etc/hostname file:

Change the names to match your server name and reboot the server. Run hostname -f again and you should see

Now, we need to check that our DNS servers have an MX record for our domain. Install DNS utilities:

apt-get install dnsutils

We are going to use host to check information about our domain:

atlantis:~# host has address YOUR-IP-ADDRESS mail is handled by 0

We can see, that the mail for our domain is handled by Now we must make sure that points to the same address as our server (

atlantis:~# nslookup
Server:         YOUR-DNS-SERVER
Address:        YOUR-DNS-ADDRESS#53
Non-authoritative answer:        canonical name =

It would be also nice if your reverse DNS points to the same name (

atlantis:~# nslookup YOUR-IP-ADDRESS
Server:         YOUR-DNS-SERVER
Address:        YOUR-DNS-SERVER#53

Non-authoritative answer:      name =

If they do not match. Ask your ISP to change this for you.

debian/dns-records.txt · Last modified: 2015/03/13 23:29 (external edit)