Community Knowledge Base

DNS Configuration for a Mail Server

The internet works on Domain Name Services (DNS). Any request made on the internet needs an address to arrive at, and those addresses are powered by DNS. So when you type in https://www.yahoo.com, DNS tells your browser to hit a specific IP address, because the IP address was entered in the DNS record for yahoo.com. Email works the same way...

Therefore, now that you have added your domains to SmarterMail, and added the users for those domains, it's time to make sure that DNS is set up properly so that email will flow into, and out of, the SmarterMail server.

Who Manages DNS?

This can be a tough question to answer, and it kind of depends on who is managing the SmarterMail server. If it's set up and being managed by a web hosting company, then chances are that hosting company can manage DNS for the domains they're hosting. If it's set up by a business, then the IT Department would generally handle it. If you're setting a SmarterMail server up for your own use, then chances are YOU manage DNS for the domain(s) you're going to be hosting. Regardless of who manages DNS for a domain, below are the records necessary to get SmarterMail -- or any mail server -- up and running.

Mail Server Specific DNS Records

There are 3 or 4 DNS records that are absolutely essential for running a mail server: An "A" record for your webmail login, an "MX" record that points to that "A" record, a reverse DNS (rDNS) record that provides extra assurance to other mail servers, and an "Autodiscover" SRV that returns the available domain and the services being used back to an email client when setting up a user within that client. Then, there are a few strongly recommended DNS records that should be set up to make sure the email sent by the domain reaches as far and wide as possible: "SPF", "DKIM" and "DMARC".

Essential Records

A Record

An Alias (A) record is a versatile DNS record type that can be used for almost anything. For an email server, you'll basically want to create an A record with "mail" as the name, that points the IP address set up for the domain in SmarterMail. This is so that people can use "http://mail.your-domain.com" and log in to the webmail interface.

The entry of this record, if using a hosting provider or DNS service, will generally look like this:

MX Record

A Mail Exchange (MX) record specifies the mail server that's responsible for accepting email messages on behalf of a domain. HOW the MX record is set up depends on the DNS provider, but it basically is its own record type and points to the A record you created, above.

The entry of this record, if using a hosting provider or DNS service, will generally look like this:

Reverse DNS

A reverse DNS (rDNS) or "PTR" entry is, essentially, the reverse version of an A record. While your A Record maps the domain name to an IP address, the PTR maps the IP address to a hostname. Generally, these are set up by the system administrator by default once the proper DNS entries are made for a domain.

Autodiscover

An autodiscover record is, more or less, crucial if you're providing email services. That's because most users don't know the information necessary to set up their accounts manually. They don't know their incoming or outgoing mail servers -- they just want to add their accounts and go. Without using autodiscover, you could be in for an influx of support issues from customers who can't get their email set up within Outlook, eM Client or Thunderbird, or who have issues setting up their accounts on their mobile devices.

To set up autodiscover in DNS, you need 2 records: an A record (See Above) that points to autodiscover.your-domain.com and the IP address of your webmail interface, and an SRV record. An SRV record is used to return the available domain and the service being used back to the client. The format for the SRV is "_autodiscover._tcp.your-domain.com". Here's what it would look like in a standard DNS provider.

Strongly Recommended Records

The next 3 records -- SPF, DKIM and DMARC -- aren't "essential" records, but they're most definitely and very STRONGLY recommended for your mail domains. All three help combat spam and tell receiving mail servers that your mail server is set up properly and that your senders are who they say they are. In addition, all of the big email providers are now checking that these three records exist for every domain that sends to them. So having them set up, and set up correctly, will help ensure that mail sent to Gmail, Microsoft 365, Yahoo! and other domains actually reaches its destination.

There's quite a bit to each of them, and we have a handy blog post -- Understanding SPF, DKIM and DMARC -- that goes over each is a great amount of detail. Therefore, rather than explaining each, below, we've included screenshots of how they'll look in a standard DNS provider.

SPF Record

DKIM Record

DMARC Record