XiaTools

Linode DNS Manager: Step-by-Step Mail Exchanger Setup

Updated 09 Oct 2026

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

  1. Log in to your cloud hosting account dashboard.
  2. Navigate to the main menu and select Domains or Networking to open the zone management interface.
  3. 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 in mail.example.com)
  • IP Address: 192.0.2.10 (use your actual server IPv4 address)
  • TTL: Default or 3600

Step 3: Create the MX Record

With your target hostname established, you can now add the actual mail routing entry.

  1. Within your domain's zone file, locate the section for adding new resource entries.
  2. Select MX from the record type dropdown menu.
  3. 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
  1. 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.10 directly 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 300 seconds 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.

Frequently asked questions

What priority number should I use for my mail exchanger setup?

The priority number depends on your provider's instructions, but 10 is the universal standard for a primary mail server. If you have a backup server, assign it a higher number like 20 or 50. Lower numbers are always checked first by sending mail servers.

Can I use an IP address directly in the mail exchanger record?

No, mail exchanger records must always point to a fully qualified domain name, such as mail.example.com. Pointing an entry directly to an IP address violates internet standards and will cause mail delivery to fail completely.

How long does it take for new mail exchanger entries to start working?

Global propagation typically takes anywhere from 5 minutes to 4 hours, depending on the Time to Live (TTL) settings of your previous records. If you lowered your TTL beforehand, the transition usually happens almost instantly.

Why am I not receiving emails after setting up my records?

Common reasons include incorrect target hostnames, missing A records for your mail server, or conflicting firewall rules blocking port 25 on your destination server. Use a lookup tool to confirm your records resolve to the correct destination.

Do I need SPF and DKIM records along with my mail exchanger setup?

Yes, while the mail exchanger entry tells the world where to deliver your incoming mail, SPF, DKIM, and DMARC records are essential for outgoing mail authentication. Implementing them prevents your messages from landing in recipient spam folders.

Related articles

Free tools