Configure DNS for Alibaba Cloud Mail

Updated at:

This topic describes how to configure DNS records for an Alibaba Cloud domain name to use with Alibaba Cloud Mail.

If your domain name and DNS service are not provided by Alibaba Cloud, see How to configure DNS for a non-Alibaba Cloud domain name or contact your domain name service provider for assistance.

Important

Before you begin, make sure your domain name has completed real-name registration.

  • Process overview: Register domain name → Complete real-name registration → Log in to the console → Mailbox Migration (optional) → Add/Switch DNS records

  • Lock risk:

    • As of July 18, 2016, .com and .net domain names must complete real-name registration after purchase. Otherwise, the registry will place the domain name on Serverhold, which prevents you from adding or activating DNS records.

    • After a successful registration, a naming review is automatically submitted, taking 1 to 2 days to complete. The Serverhold status is temporarily removed after the review is passed.

    • If you do not submit the required information and pass the real-name registration review within 5 days of registration, the domain name will be locked again.

  • Solution: If your domain name is locked, you must complete the real-name registration process to unlock it.

Domain name resolution

Domain name resolution maps the domain name in an email address to the IP address of the corresponding mail server.

It primarily involves the following three types of records:

MX record

  • Definition: Specifies the mail servers that receive email for your domain name.

  • Priority rules (Important):

    • You can configure multiple MX records for a single domain name.

    • The lower the priority value, the higher the priority.

    • Sending servers first attempt to connect to the server with the highest priority (lowest number). They connect to lower-priority servers only if the higher-priority ones are unavailable.

    • Example: If you configure two records with a priority of 5 and 10, mail is always sent to the server with priority 5 first.

CNAME record

Use CNAME records to point subdomains to Alibaba Cloud Mail service addresses for branded access:

  • mail: Lets users access the webmail login page with the URL mail.your-domain.com. For more information, see How to customize your email login address?.

  • smtp: Lets email clients use smtp.your-domain.com as the outgoing mail server address.

  • imap: Lets email clients use imap.your-domain.com as the incoming mail server address.

  • pop3: Lets email clients use pop3.your-domain.com as the incoming mail server address.

TXT record (SPF/DKIM/DMARC)

  • SPF: Declares which IP addresses are authorized to send email for your domain name. This helps prevent your messages from being marked as spam or spoofed.

  • DKIM/DMARC: Some recipient mail services require these records. Configure them to ensure high email deliverability.

Alibaba Cloud Mail DNS records

Standard DNS records

Host record

Type

Priority

Value

@

MX

5

mx1.qiye.aliyun.com

@

MX

10

mx2.qiye.aliyun.com

@

MX

15

mx3.qiye.aliyun.com

imap

CNAME

imap.qiye.aliyun.com

pop3

CNAME

pop.qiye.aliyun.com

smtp

CNAME

smtp.qiye.aliyun.com

mail

CNAME

qiye.aliyun.com

@

TXT

v=spf1 include:spf.qiye.aliyun.com -all

default._domainkey

TXT

How to get this value: Log in to the Alibaba Cloud Mail console as an administrator, go to **Domains** > **Domain Settings**, and click **View Details**.image

Note: If you change the encryption strength later, you must obtain the new record value and reconfigure your DNS settings.

_dmarc

TXT

v=DMARC1;p=none;rua=mailto:user@example.com;ruf=mailto:user@example.com

Note: Replace both email addresses with an address in your organization for receiving reports from recipient mail servers.

Enterprise Group Mail and legacy DNS records

Host record

Type

Priority

Value

@

MX

5

mxn.mxhichina.com

@

MX

10

mxw.mxhichina.com

imap

CNAME

imap.mxhichina.com

pop3

CNAME

pop3.mxhichina.com

smtp

CNAME

smtp.mxhichina.com

mail

CNAME

mail.mxhichina.com

@

TXT

v=spf1 include:spf.qiye.aliyun.com -all

default._domainkey

TXT

How to get this value: Log in to the Alibaba Cloud Mail console as an administrator, go to **Domains** > **Domain Settings**, and click **View Details**.image

Note: If you change the encryption strength later, you must obtain the new record value and reconfigure your DNS settings.

_dmarc

TXT

v=DMARC1;p=none;rua=mailto:user@example.com;ruf=mailto:user@example.com

Note: Replace both email addresses with an address in your organization for receiving reports from recipient mail servers.

Configure DNS records

One-click setup (Mail console)

Note

Prerequisite: Your domain name and Alibaba Cloud Mail service must be under the same Alibaba Cloud account.

1. Log in to the Alibaba Cloud Mail console. In the list of email domains, find the domain that you want to configure and click Manage.

管理.png

2. On the details page, click Set Resolution --> Add Mailbox DNS with One-Click.

设置解析.pngimage

If you see the error "Failed to add. Please try again.":

This error occurs if a CNAME record already exists for the @ host. You cannot add an MX record for a host that has a CNAME record, as this creates a DNS record conflict. For more information, see DNS record conflict rules. You must decide whether to delete the existing CNAME record before adding the Alibaba Cloud Mail records.

If the status still shows "Resolution not effective" after adding the records, click **Refresh Status** or **Check Domain Resolution**.

image.png

3. After the records are added successfully, they are automatically created. You can view them in the Domains console by clicking DNS.image

Quick setup (Domains console)

Note

Prerequisite: Your domain name is managed by Alibaba Cloud. The domain name does not need to be in the same account as your mail service.

1. Log in to the Domains console. In the list, find the domain name you want to configure and click DNS to go to the DNS Settings page.

image

2. Click Quick Add Mailbox DNS, select Alibaba Cloud Mail, and then click OK to quickly set up the records.

image

image

3. The DNS records are now configured.image.png

Manual setup (Domains console)

Note

Use case: This method is suitable for all scenarios, especially for custom configurations or troubleshooting.

1. Log in to the Domains console, find the domain name you want to use, and click DNS to go to the DNS Settings page.

image

2. Click Add Record and add the records one by one from the Alibaba Cloud Mail DNS records table above.

添加记录.png

Common issues and troubleshooting

  1. Propagation time:

    • DNS changes can take 10 minutes to 24 hours to propagate globally, although they often take effect within 10 minutes.

  2. DNS records not taking effect:

    • If the status still shows "Not effective" after you add the records, click **Refresh Status** or **Check Domain Resolution** in the console.刷新.png

    • You can use the local command nslookup -type=mx your domain name to run a test.

  3. Web page error message:

    • If you log in to the Alibaba Cloud Mail home page and see the error: "The MX record for the email domain is not pointing to the Enterprise Mail service, you will not be able to receive emails from external domains."

    • Recommended action: If local tests confirm that the MX record has propagated and you can send and receive email normally, you can ignore this message. This is likely caused by a caching delay in the UI or detection system and does not affect your email service.

  4. DNS record conflict:

    • According to the DNS specification, MX records and CNAME records cannot coexist for the same hostname, such as @. If a CNAME record for @ already exists, such as one that points to a website, you must delete the CNAME record before you can add an MX record. Before you delete the record, evaluate the impact on your business services.