Alibaba Mail domain name resolution guide

Updated at:

This topic describes how to configure the core DNS records for your Alibaba Mail domain. It covers different scenarios, including basic email delivery, security, client setup, custom webmail access, and multiple domains. Follow the steps for each scenario to set up your email system correctly.

1. Basic email sending and receiving (MX)

2. Enhanced security (SPF/DKIM/DMARC)

3. Client configuration (SMTP/IMAP/POP3)

4. Custom webmail access (Webmail)

5. Multiple domains and domain aliases (Other domain names)

1. Basic email sending and receiving (MX)

Ensure send and receive functionality for the default web client

The default logon address for the Alibaba Mail webmail is: https://qiye.aliyun.com/

Core configuration:

Sending:

Note

Prerequisite: You must configure MX records to receive emails before you can send them.

In addition, recipients often require Sender Policy Framework (SPF), DomainKeys Identified Mail (DKIM), and Domain-based Message Authentication, Reporting, and Conformance (DMARC) configurations. For more information, see the steps in the "Enhanced security" section.

Receiving:

  1. MX record (Required)

    • Function: Specifies the server address for receiving emails.

    • For more information, see What is an MX record?

Configuration method

Domain name resolution

Record Type

Priority

Record Value

@

MX

5

mx1.qiye.aliyun.com

@

MX

10

mx2.qiye.aliyun.com

@

MX

15

mx3.qiye.aliyun.com

Example in the Alibaba Cloud DNS console:

Validation method

Query the record using the Alibaba Cloud DNS query tool:

Validation command:

# Query the MX record 
nslookup -type=mx example.com        # Windows  
dig mx example.com +short            # Mac/Linux  

image

2. Enhanced security (SPF/DKIM/DMARC)

Goal: Prevent spoofing, hijacking, and phishing attacks to improve email credibility.

Core configuration:

  • SPF record (Required by some recipients)

    • Function: Authorizes legitimate sending server IP addresses.

    • For more information, see What is SPF?

Note

A domain can have only one SPF record. If you have multiple outbound IP addresses, merge them into a single record. Ensure that all IP addresses are trustworthy. If the IP address range is too large and includes IP addresses that do not belong to you, your domain is at risk of being spoofed.

Example of syntax for a parsed value:

Domain + Domain: v=spf1 include the following:spf.qiye.aliyun.com include the following:spf1.dm.aliyun.com -all

Domain name and IP address: v=spf1 include the following:spf.qiye.aliyun.com ip4:x.x.x.x -all

Domain + IP range (Use with caution): v=spf1 include the following:spf.qiye.aliyun.com ip4:x.x.x.x/24 -all

Note: Use `ip4`, not `ipv4`.

Configuration method

Host record

Record type

Record value

@

TXT

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

Example in the Alibaba Cloud DNS console:

Validation method

Query the record for example.com using the Alibaba Cloud DNS query tool:

Validation command:

# Query the TXT record 
nslookup -type=txt example.com        # Windows  
dig txt example.com +short            # Mac/Linux  

image

Configuration method

Host record

Record type

Record value

default._domainkey.example.com

TXT

How to obtain the value: Log on to the management console as an administrator. Go to Enterprise Customization > Domain Management > Domain Settings, and then click View Configuration Method.

Obtain the host record and record value

Example in the Alibaba Cloud DNS console:

Validation method

Query the record for default._domainkey.example.com using the Alibaba Cloud DNS query tool:

Validation command:

# Query the DKIM record 
nslookup -type=txt default._domainkey.example.com        # Windows  
dig txt default._domainkey.example.com +short            # Mac/Linux  

image

  • DMARC record (Required by some recipients)

Configuration method

Host record

Record type

Record value

_dmarc.example.com

TXT

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

Note

Replace the two instances of user@example.com with the mailbox that you want to use to receive reports. We recommend using a mailbox from the same domain.

Example in the Alibaba Cloud DNS console:

Validation method

Query the record for _dmarc.example.com using the Alibaba Cloud DNS query tool:

Validation command:

nslookup -type=txt _dmarc.example.com  # Windows  
dig txt _dmarc.example.com +short      # Mac/Linux  

image

3. Client configuration (SMTP/IMAP/POP3)

Goal: Send and receive emails with third-party clients such as Outlook and Foxmail.

Note

The Alibaba Mail client does not require manual server address configuration.

Core configuration:

  1. SMTP/IMAP server addresses and ports

Default server addresses and ports

For more information, see Alibaba Mail IMAP, POP, and SMTP addresses and ports

Protocol

Default server address

Server port (Standard)

Server port (Encrypted)

Purpose

SMTP

smtp.qiye.aliyun.com

25

465

Send emails

IMAP

imap.qiye.aliyun.com

143

993

Sync emails (bidirectional)

POP3

pop.qiye.aliyun.com

110

995

Sync emails (unidirectional)

Configuration method

Custom domain name resolution (CNAME)

Host record

Record type

Record value

smtp.example.com

CNAME

smtp.qiye.aliyun.com

imap.example.com

CNAME

imap.qiye.aliyun.com

pop3.example.com

CNAME

pop.qiye.aliyun.com

Create a CNAME record for each protocol to point your custom domain to the default server address.

Example in the Alibaba Cloud DNS console:

After the DNS records take effect, you can use the new addresses to configure your client.

Validation method

Query the record for smtp.example.com using the Alibaba Cloud DNS query tool:

Validation command:

nslookup -type=txt smtp.example.com  # Windows  
dig txt smtp.example.com +short      # Mac/Linux  

image

4. Custom webmail access (Webmail)

Goal: Access the Alibaba Mail web version using your own domain name.

Core configuration:

  1. CNAME record

Access method:

  • In your browser, go to https://webmail.example.com.

Configuration method

First, go to Customize Mailbox Logon Address and add a domain name. The recommended format is webmail.example.com. Then, obtain the record values and add the two records to your domain's DNS settings.

Example in the Alibaba Cloud DNS console:

Validation method

Query the record for webmail.example.com using the Alibaba Cloud DNS query tool:

Validation command:

nslookup -type=cname webmail.example.com  # Windows  
dig cname webmail.example.com +short      # Mac/Linux  

image

5. Multiple domains and domain aliases (Other domain names)

Goal: Support multiple domain names or aliases (such as example.com and example.net) in the same email system.

Core configuration:

  1. Attach the domain name in the mail management console.

  2. Configure MX records for each domain independently.

  3. Configure security records independently:

    • Generate separate SPF, DKIM, and DMARC records for each domain.

  4. For more information, see How do I add multiple domains and domain aliases?

6. FAQ and troubleshooting

1. Emails are rejected (SPF failure)

This can be caused by a missing SPF record, a syntax error, or a delivery IP address that is not included in the SPF record.

For more information, see What is SPF?

2. What should I do if my SPF record needs to include multiple service providers?

Note

A domain can have only one SPF record. If you have multiple outbound IP addresses, merge them into a single record. Ensure that all IP addresses are trustworthy. If the IP address range is too large and includes IP addresses that do not belong to you, your domain is at risk of being spoofed.

Example of syntax for a parsed value:

Domain + Domain: v=spf1 include the following:spf.qiye.aliyun.com include the following:spf1.dm.aliyun.com -all

Domain name and IP address: v=spf1 include the following:spf.qiye.aliyun.com ip4:x.x.x.x -all

Domain + IP range (Use with caution): v=spf1 include the following:spf.qiye.aliyun.com ip4:x.x.x.x/24 -all

Note: Use `ip4`, not `ipv4`.

3. Emails are rejected (Invalid DKIM signature)

  • Checkpoints:

    • Is the public key complete? Avoid line breaks or spaces when you copy it.

    • Does the selector name match the one in the console, such as default._domainkey?

    • After you switch between 1024-bit and 2048-bit keys, you must reconfigure the record with the latest value. Then, access the configuration interface again to trigger server-side signing.

7. References

How do I configure DNS records for an Alibaba Cloud (Wanwang) domain name to use Alibaba Mail?

How do I configure DNS records for a domain name not from Alibaba Cloud (Wanwang) to use Alibaba Mail?