Create an MX Record

An MX record enables the edjDNS to manage all incoming email requests to the corresponding email exchange server or the SMTP email server.

An MX record consists of the following data:

  • Name: The root domain or the hostname of the domain.

  • TTL: The time duration, in seconds, for which a record can be retained in the recursive resolver’s cache.

  • Target: The IPv4 address of the mail exchange server.

  • Priority Level: The sequence in which the mail exchange server handles the email requests. A smaller value indicates a higher priority. If you are using multiple mail servers, you must define the priority level for each server. It is recommended to configure more than one MX record for fallback reasons.

When creating MX records, consider the following limitations:

  • Multiple MX records are allowed per name.

  • Co-existing with NS records is not permitted.

In this tutorial, create two mail servers: mail1.host.com with priority 10 and mail2.host.com with priority 20.

TYPE NAME TARGET TTL PRIORITY PROXY

MX

@

mail1.host.com

1200

10

-

MX

@

mail2.host.com

1200

20

-

Use the edjConsole

  1. Log into the Console.

  2. Switch to the organization associated with the domain you want to add the record.

    View Selector

  3. Navigate to Main Menu > Domains.
    The Domain page displays.

    domain full select

  4. Click on a domain.
    The Domain Attributes page displays.

  5. Click Create Record.

  6. Enter the following to create an MX record:

    • TYPE: MX

    • NAME: @

    • TARGET: mail1.host.com

    • TTL: 1200

    • PRIORITY: 10

      create mx record 2

  7. Click Create.

  8. Repeat steps 5 -7 to create another MX record:

    • TYPE: MX

    • NAME: @

    • TARGET: mail2.host.com

    • TTL: 1200

    • PRIORITY: 20

      create mx record 3

      The MX records add to the list of resource records for the domain. For all incoming email requests, the edjDNS will try mail1.host.com. In case of failure, it will default to mail2.host.com.

EdjCLI

  1. Switch to the organization associated with the domain you want to add the record.

    edjx config organization -i
  2. Select the domain to add the record.

    edjx config domain -i
  3. Create an MX record with priority 10.

    root@edjx:~ # edjx domain records create @ MX mail1.host.com 1200 --priority 10
    Record created successfully.
    Record ID: 0d2d6f8a-cd1a-423c-8ec2-2408181d8691
  4. Create another MX record with priority 20.

    root@edjx:~ # edjx domain records create @ MX mail2.host.com 1200 --priority 20
    Record created successfully.
    Record ID: 12a29d8c-97e2-42d6-abd8-3dcedc0e13a7
  5. List the domain records.

    root@edjx:~ #  edjx domain records list
    ID                                    Name  Type  Target                 TTL   Proxy  Created By  Created On
    
    12a29d8c-97e2-42d6-abd8-3dcedc0e13a7  @     MX    mail2.host.com         1200  false  edjdocs     2022-03-08 12:56:16.349 -0700 MST
    0d2d6f8a-cd1a-423c-8ec2-2408181d8691  @     MX    mail1.host.com         1200  false  edjdocs     2022-03-08 12:49:48.316 -0700 MST