Receive mail with MX records
Add an MX record that names your mail servers and their priorities in Edge DNS, from Azion Console, the Azion CLI, or the API, and check the answer with dig.
You can add an MX record to a zone in Edge DNS from Azion Console, the Azion CLI, or the Azion API. The record below names two mail servers for example.com, each with a priority, so that mail sent to addresses at the domain reaches them. To add another type of record, refer to Add, edit, or delete a record.
Prerequisites
Console
- A zone for your domain in Edge DNS. To create one, refer to Create, edit, or delete a zone.
- The hostname and the priority of each mail server, as your mail provider gives them.
- The Edit Edge DNS permission. Refer to Teams permissions.
- Access to Azion Console. To sign in, refer to Access Azion Console.
Add the MX record
One MX record holds every mail server for a name, one value per server, up to 10 values. Each value is a priority, a space, and the mail server’s hostname. The record goes on @, the zone apex, to receive mail for addresses such as user@example.com. For the rules of the value, refer to MX.
Console
To add the record in Azion Console:
Access Azion Console > Edge DNS.
On the Zones page, select the row of the zone, then select the Records tab.
The Create Record drawer opens.
In Name, enter @. The Console adds the domain for you, so the record answers for example.com.
In Record Type, select MX - Mail exchange.
Keep TTL (seconds) at 3600.
In Value, enter 10 mail.example.com on the first line and 20 mail2.example.com on the second.
The Console shows Edge DNS Record has been created, and the record appears in the Records table with both values.
A second MX record on the same name is refused with 19004 Record Already Exists. To add a mail server later, edit the existing record and add a value.
Check the answer
Ask Azion’s nameserver directly, without your resolver’s cache, for the MX record of the domain. Replace example.com with your domain:
The nameserver returns one line per value, with the priority first:
If the command prints nothing, refer to A new record returns NXDOMAIN. A change to an existing MX record can take a few minutes to reach every nameserver. For the reasons, refer to Caching and propagation.