Linode DNS Manager: Step-by-Step Mail Exchanger Setup
Configuring your mail server requires adding the correct mail exchanger settings to your domain's zone file. To ensure your incoming messages arrive without interruption, you must correctly map your domain to your mail server provider using priority values and fully qualified domain names. Before making any modifications, you can use the MX Lookup tool to quickly verify your current mail exchanger status and spot any active propagation or configuration issues.
Understanding Mail Exchanger Settings
A mail exchanger entry tells sending mail transfer agents which server is responsible for accepting messages on behalf of your domain. Every zone file requires at least one of these entries, though production environments often utilize a primary and a secondary server for redundancy.
Core Components of a Mail Record
When you configure these records within your hosting control panel, you will interact with four main fields:
- Name / Host: Usually left blank or set to your root domain (
example.com), indicating the record applies directly to incoming mail for your domain. - Type: Always set to
MX. - Priority: A numeric value determining the order in which sending servers try your mail hosts. Lower numbers mean higher priority.
- Value / Target: The fully qualified domain name of your mail server, such as
mail.example.com. Never use an IP address directly in this field.
Priority Routing Explained
Priority numbers work like a backup ladder. A sending server will always attempt delivery to the lowest priority number first. If that server is offline or unreachable, it moves to the next highest number.
| Priority | Target Host | Purpose |
|---|---|---|
| 10 | mail1.example.com |
Primary mail server (handles all standard traffic) |
| 20 | mail2.example.com |
Secondary/backup server (handles mail if primary fails) |
Step-by-Step Setup Guide
Setting up your mail exchanger entries takes just a few minutes when you follow a structured workflow. Make sure you have your mail server hostname and priority numbers ready before you begin.
Step 1: Access the DNS Manager
- Log in to your cloud hosting account dashboard.
- Navigate to the main menu and select Domains or Networking to open the zone management interface.
- Locate the specific domain name (e.g.,
example.com) where you want to add the mail records and click to open its configuration settings.
Step 2: Add an A Record for Your Mail Server
Before adding your mail exchanger entry, ensure your target hostname resolves to an IP address. If your mail server is hosted on your cloud instance, you need an A record.
- Record Type:
A - Hostname:
mail(resulting inmail.example.com) - IP Address:
192.0.2.10(use your actual server IPv4 address) - TTL:
Defaultor3600
Step 3: Create the MX Record
With your target hostname established, you can now add the actual mail routing entry.
- Within your domain's zone file, locate the section for adding new resource entries.
- Select MX from the record type dropdown menu.
- Enter the required parameters based on your mail provider's documentation:
Record Type: MX
Hostname: @ (or leave blank for example.com)
Mail Server: mail.example.com
Priority: 10
TTL: Default
- Click Save Changes or Add Record to commit the entry to the zone file.
Verifying Your Configuration
After saving your settings, you must verify that the records are propagating and resolving correctly across the global network. You can use command-line utilities to check your work directly from your local machine.
Using Dig to Query MX Records
Run the following command in your terminal to query the mail exchanger settings for your domain:
dig example.com MX +short
A correct response will display the priority number and the target hostname:
10 mail.example.com.
Checking IPv6 Mail Support (Optional)
If your mail server supports IPv6, you should also create an AAAA record for your mail subdomain:
Record Type: AAAA
Hostname: mail
IP Address: 2001:db8::10
TTL: Default
Common Mistakes and How to Fix Them
Even experienced administrators occasionally run into minor configuration errors. Review these frequent pitfalls to keep your mail flow operational.
- Pointing to an IP Address instead of a Hostname: Many users attempt to enter
192.0.2.10directly into the mail server target field. Mail exchangers require a domain name target. Always create an A record first, then point the mail entry to that hostname. - Forgetting the Trailing Dot in External Providers: When pointing your mail to an external provider like Google Workspace or Microsoft 365, ensure you copy their exact hostname string (e.g.,
mail.protection.outlook.com.) and include the trailing dot if your control panel requires absolute domain notation. - Ignoring TTL Propagation Delays: If you recently changed your mail host, cached DNS entries can cause messages to bounce for a few hours. Lower your TTL to
300seconds 24 hours before making changes to minimize this downtime.
Quick Checklist for Mail Exchanger Setup
- Gather correct priority numbers and hostnames from your email provider.
- Verify an A record exists for your mail subdomain (
mail.example.com). - Add the MX record with the proper priority value.
- Save the zone file changes in your control panel.
- Test resolution using command-line tools or a web lookup utility.