ArcPanel can host the DNS zone and the mail of your domains. This guide continues with the user alice and the domain example.com from Add your first domain.
Choose where DNS lives
There are two ways to run DNS for a domain:
- ArcPanel hosts the zone. The server answers DNS for the domain, and ArcPanel adds the records for the web, mail and webmail itself. You set the domain's name servers at your registrar. This needs BIND, which the installer sets up by default.
- Your registrar or DNS provider keeps the zone. You add the records that ArcPanel shows you there by hand.
Both work; the first needs fewer steps when you add domains later. The rest of this guide marks the steps for each.
Host the zone on ArcPanel
Set the name servers
New zones use the name servers of the user's package (the Name servers field in Packages), or of the user (the Name servers tab when you edit a user). The default package has placeholders; set them to real names first, for example ns1.example.net and ns2.example.net. Two to eight names are allowed.
At the registrar of those name server names, create glue records (A records) that point them to the server's IP address. Your registrar's help pages call this "child name servers" or "glue records".
Check the zone
If you left Create DNS zone on when you added the domain, the zone exists already. Otherwise open DNS in the sidebar, click Add DNS Domain, enter the Domain and the IP Address, keep the default Template and save.
The default template creates the records a hosting account needs:
| Record | Type | Points to |
|---|---|---|
@ |
A | the server's IP address |
www |
CNAME | example.com |
mail |
A | the server's IP address |
webmail |
CNAME | mail.example.com |
@ |
MX | mail.example.com |
@ |
TXT | SPF: v=spf1 a mx ip4:… -all |
_dmarc |
TXT | v=DMARC1; p=quarantine; pct=100 |
Click the zone to see its DNS Records and use Add Record for anything else, such as a TXT record to verify the domain with another service.
Use another Template when mail is handled elsewhere: default-nomail leaves the mail records out, and gmail, office365 and zoho point MX to those services.
Point the domain
At the registrar of example.com, set its name servers to the names you configured. The change usually takes a few hours to reach everyone.
dig +short NS example.com
dig +short A example.com
When both commands return your name servers and the server's IP address, DNS is done.
DNSSEC
Once the administrator has switched DNSSEC on for the server (DNS), the zone's edit page has Enable DNSSEC. After you turn it on, View Public DNSSEC Key shows the DS Record to enter at the registrar. Skip DNSSEC on your first domain: a wrong DS record makes the domain unreachable.
Keep DNS at your provider
At your DNS provider, create:
- an A record for
example.comand forwww.example.com, pointing to the server's IP address; - the mail records from the DNS Records page of the mail domain (next section).
Add a mail domain
If you left Create mail domain on when you added the domain, it exists already. Otherwise:
- Open Mail in the sidebar and click Add Mail Domain.
- Enter the Domain and keep
roundcubeas Webmail Client. - Keep Spam Filter, Reject Spam, Anti-Virus and DKIM Support on. (Spam and virus filters work only if they were installed.)
- Turn on SMTP Relay only if outgoing mail must go through another provider; it asks for its Host, Port, Username and Password.
- Save.
v-add-mail-domain alice example.com
Publish DKIM, SPF and DMARC
Receiving servers trust your mail when the domain publishes these records. In Mail, open the menu of the domain and choose DNS Records. The page lists the A record of mail.example.com, the MX record, SPF, DMARC and the DKIM key at mail._domainkey.
- ArcPanel hosts the zone: the records are in the zone already; there is nothing to copy.
- DNS at your provider: copy each row into your provider's zone exactly as shown.
From the command line, the DKIM record alone:
v-list-mail-domain-dkim-dns alice example.com
Important
Ask your server provider to set the reverse DNS (PTR) of the server's IP address to the panel host name. Many mail servers reject mail from an IP address without matching reverse DNS, whatever the other records say.
Issue a certificate for mail
Mail apps connect to mail.example.com. Give it a certificate so they do not warn: edit the mail domain, open the SSL tab, turn on Enable SSL for this domain and Use Let’s Encrypt to obtain SSL certificate, and save. As for web domains, mail.example.com must resolve to the server first.
Create mailboxes
- In Mail, open the menu of the domain and choose Add Mail Account.
- Enter the Account (the part before
@example.com) and a Password. - Under Advanced Options, set a Quota, Aliases or Forward to if you need them.
- Fill in Email login credentials to: to send the settings to the person who will use the mailbox, and save.
v-add-mail-account alice example.com info 'a-strong-password'
Settings for mail apps
The mailbox page shows Common Account Settings. In short:
| Protocol | Server | SSL/TLS | STARTTLS |
|---|---|---|---|
| IMAP | mail.example.com |
993 | 143 |
| POP3 | mail.example.com |
995 | 110 |
| SMTP | mail.example.com |
465 | 587 |
The user name is the full address, info@example.com.
Open webmail
Roundcube runs on the panel host on port 8086, for example https://panel.example.com:8086. From the panel, Open Webmail in the mail domain's menu opens it, and Open Webmail (signed in) in a mailbox's menu signs straight in to that mailbox.
The administrator can serve webmail on webmail.example.com instead: Server › Configure › Mail Server, Open Webmail on.
Next steps
- Send a test message to an outside address and check that it arrives in the inbox, not in spam.
- Schedule backups: mailboxes are in the nightly backup.