email:dns-configuration:mx-records
Differences
This shows you the differences between two versions of the page.
| email:dns-configuration:mx-records [2026/08/03 13:25] – created - external edit 127.0.0.1 | email:dns-configuration:mx-records [2026/08/03 13:29] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | # MX Records (Mail Exchanger) | + | ====== |
| A **Mail Exchanger (MX) Record** is a type of Resource Record in the Domain Name System (DNS) that specifies the mail server responsible for accepting email messages on behalf of a domain name. | A **Mail Exchanger (MX) Record** is a type of Resource Record in the Domain Name System (DNS) that specifies the mail server responsible for accepting email messages on behalf of a domain name. | ||
| Line 5: | Line 5: | ||
| Without valid MX records, sending servers cannot locate your mail infrastructure, | Without valid MX records, sending servers cannot locate your mail infrastructure, | ||
| - | --- | + | ---- |
| - | ## How MX Records Work | + | ===== How MX Records Work ===== |
| - | When someone sends an email to `user@example.com`, the sender' | + | When someone sends an email to '' |
| - | 1. **DNS Lookup:** Queries DNS for the `MX` records associated with `example.com`. | + | # **DNS Lookup:** Queries DNS for the '' |
| - | 2. **Priority Resolution: | + | # |
| - | 3. **A/AAAA Lookup:** Resolves the primary MX hostname to an IP address (`A` or `AAAA` record). | + | # |
| - | 4. **SMTP Connection: | + | # |
| - | --- | + | ---- |
| - | ## MX Record Structure & Parameters | + | ===== MX Record Structure & Parameters |
| An MX record consists of three core components: | An MX record consists of three core components: | ||
| - | | Component | + | ^ Component |
| - | | :--- | :--- | :--- | | + | | **Name / Host** | '' |
| - | | **Name / Host** | `@` or `example.com` | The domain name receiving the email. | | + | | **Preference / Priority** | '' |
| - | | **Preference / Priority** | `10` | Integer value indicating server priority (lower numbers = higher priority). | | + | | **Mail Server / Target** | '' |
| - | | **Mail Server / Target** | `mail.example.com` | The Fully Qualified Domain Name (FQDN) of the mail server. | | + | |
| - | > **Crucial Rule:** The target of an MX record **MUST** point to a valid domain name (`A` or `AAAA` record). It **must never** point directly to an IP address or a `CNAME` alias. | + | > **Crucial Rule:** The target of an MX record **MUST** point to a valid domain name ('' |
| - | --- | + | ---- |
| - | ## MX Record Priority Explained | + | ===== MX Record Priority Explained |
| Priorities allow domain administrators to set up primary and backup fallback mail servers. | Priorities allow domain administrators to set up primary and backup fallback mail servers. | ||
| - | ```text | + | < |
| Priority 10 : mail1.example.com | Priority 10 : mail1.example.com | ||
| Priority 20 : mail2.example.com | Priority 20 : mail2.example.com | ||
| + | </ | ||
| - | ``` | + | * **Equal Priorities: |
| + | * **Lower Number = Higher Preference: | ||
| - | * **Equal Priorities: | + | ---- |
| - | * **Lower Number = Higher Preference: | + | |
| - | --- | + | ===== Example Configurations ===== |
| - | ## Example | + | ==== Example |
| - | ### Example 1: Standard Self-Hosted Mail Server | + | ^ Record Type ^ Host ^ Priority ^ Value / Target ^ TTL ^ |
| + | | **MX** | '' | ||
| + | | **A** | '' | ||
| - | | Record Type | Host | Priority | Value / Target | TTL | | + | ==== Example |
| - | | --- | --- | --- | --- | --- | | + | |
| - | | **MX** | `@` | `10` | `mail.example.com.` | `3600` | | + | |
| - | | **A** | `mail` | — | `192.0.2.25` | `3600` | | + | |
| - | ### Example 2: Google Workspace Configuration | + | ^ Record Type ^ Host ^ Priority ^ Value / Target ^ TTL ^ |
| + | | **MX** | '' | ||
| - | | Record Type | Host | Priority | Value / Target | TTL | | + | ---- |
| - | | --- | --- | --- | --- | --- | | + | |
| - | | **MX** | `@` | `1` | `SMTP.GOOGLE.COM.` | `3600` | | + | |
| - | --- | + | ===== Common Issues & Troubleshooting ===== |
| - | ## Common Issues & Troubleshooting | + | ==== 1. Pointing MX Records to CNAMEs |
| - | + | Pointing an MX record to a target that is a CNAME alias violates [[https:// | |
| - | ### 1. Pointing MX Records to CNAMEs | + | |
| - | + | ||
| - | Pointing an MX record to a target that is a CNAME alias violates [RFC 2181 (Section 10.3)](https:// | + | |
| - | + | ||
| - | ### 2. Pointing MX Records directly to IP Addresses | + | |
| + | ==== 2. Pointing MX Records directly to IP Addresses ==== | ||
| MX records require an FQDN as their target. Pointing directly to an IPv4/IPv6 address will cause syntax validation failures across major mail servers. | MX records require an FQDN as their target. Pointing directly to an IPv4/IPv6 address will cause syntax validation failures across major mail servers. | ||
| - | ### 3. Missing Trailing Dot (in Raw Zone Files) | + | ==== 3. Missing Trailing Dot (in Raw Zone Files) |
| + | In raw DNS zone files, failing to append a trailing dot ('' | ||
| - | In raw DNS zone files, failing to append a trailing dot (`mail.example.com.`) may cause DNS servers to append the root domain twice (`mail.example.com.example.com`). | + | ---- |
| - | --- | + | ===== Verification & Testing |
| - | + | ||
| - | ## Verification & Testing | + | |
| You can test and verify your MX records using **Telenegar Tools** or terminal commands: | You can test and verify your MX records using **Telenegar Tools** or terminal commands: | ||
| - | ### Using Telenegar Tools | + | ==== Using Telenegar Tools ==== |
| + | * **DNS Resolution: | ||
| + | * **Mail Server Health:** Run a complete deliverability scan with the [[tools: | ||
| - | Validate your domain' | + | ==== Using Terminal Tools ==== |
| - | ### Using Terminal Tools | + | === dig (Linux / macOS) |
| - | + | < | |
| - | #### `dig` (Linux / macOS) | + | |
| - | + | ||
| - | ```bash | + | |
| dig +short example.com MX | dig +short example.com MX | ||
| + | </ | ||
| - | ``` | + | === nslookup (Windows / Cross-platform) |
| - | + | < | |
| - | #### `nslookup` (Windows / Cross-platform) | + | |
| - | + | ||
| - | ```cmd | + | |
| nslookup -type=MX example.com | nslookup -type=MX example.com | ||
| + | </ | ||
| - | ``` | + | ---- |
| - | + | ||
| - | --- | + | |
| - | + | ||
| - | ## Related Documentation | + | |
| - | * [Telenegar DNS Check Tool](https:// | + | ===== Related Documentation ===== |
| - | * [Telenegar Mail Check Tool](https:// | + | |
| - | * [SPF (Sender Policy Framework)](https:// | + | |
| - | * [DKIM (DomainKeys Identified Mail)](https:// | + | |
| - | * [DMARC](https:// | + | |
| - | * [Reverse DNS (PTR Records)](https:// | + | |
| - | ``` | + | * [[tools: |
| + | * [[tools: | ||
| + | * [[email: | ||
| + | * [[email: | ||
| + | * [[email: | ||
| + | * [[networking: | ||
email/dns-configuration/mx-records.1785763512.txt.gz · Last modified: by 127.0.0.1
