Skip to content

DNS, FQDN & PTR Records

Schahriar SaffarShargh edited this page Nov 2, 2015 · 1 revision

A brief on DNS for Email

Galleon as an email server will listen on the Simple Mail Transfer Protocol (SMTP) port 25 for connections in order to receive emails but first mail senders would require the IP Address of the host of this server. This is where an Address record (A record) on a Fully Qualified Domain Name (FQDN) will come in play. By setting the @ A record to the host IP Address an email server such as Galleon can be connected to by other mail servers.


Fully Qualified Domain Name

Galleon and every other mail server solutions (using SMTP) require a Fully Qualified Domain Name by default. As complex as it may sound a FQDN in short is any domain name that is linked to a specific server/host. As described in the Wikipedia page,

[An example of a FQDN is] a device with the hostname myhost and the parent domain example.com has the fully qualified domain name myhost.example.com. The FQDN uniquely distinguishes the device from any other hosts called myhost in other domains.

MX Records

A mail server will be on a single FQDN e.g. galleon.email. This will server anything@galleon.email but a mail server may want to provide email service for more than just one domain. For example you may want to receive emails from info@example.com in galleon.email setup. This is where Mail Exchanger records (MX records) comes in. MX is a part of your Domain's DNS where mail senders lookup to locate your email server. It simply stores a record of the mail host with a Fully Qualified Domain Name (FQDN) to pass the emails to and the Mail Server will then process and stores emails.

Setting up DNS for your Mail Server

By creating an Address record in your Domain's DNS you will be able to receive incoming emails through Galleon. Simply login to your domain name provider's account or your DNS provider (DNS may also be handled by your hosting provider) and add/change the following record where the record name is @:

Note that many DNS providers have their own implementation/interface for setting up these records but the general setup of DNS records remain the same across all platforms.

A   @   +!?ip-address

In order to test the results you can run the following command in a Linux/UNIX or where dig is available:

dig +!?Mail-Server-FQDN A

You can then redirect mail from other domains to this mail server using MX records:

MX   0   +!?Mail-Server-FQDN

And test it using:

dig +!?Domain-Name MX

PTR Records

PTR Records enable simple verification of the origin of an email through a process known as Reverse DNS lookup. Although it may be simple to create PTR in your DNS settings some services require additional setup to enable PTR records. You can lookup FAQ of your DNS/Hosting provider or contact them directly to find more information about PTR records. Note that PTR Records are an optional feature and may not be required for small email setups but you have the chance of some strict spam protection systems from blocking your outgoing email


Resources

An Introduction to DNS Terminology, Components, and Concepts