SPF authenticates email senders by verifying IP addresses against DNS records to prevent spoofing and spam.
What is SPF?
Sender Policy Framework (SPF) is an email authentication method that combats spam. Receiving mail servers check the domain's SPF record to verify whether the sender's IP address is authorized. Authorized addresses are accepted; unauthorized addresses are rejected as forgeries.
How to add an SPF record
If your domain is not registered with Alibaba Cloud, contact your domain provider for instructions.
The following example uses Alibaba Cloud DNS:
1. Log on to the Alibaba Cloud DNS console. Find your domain and click **Resolve** in the **Actions** column. The DNS Settings page appears.
2. On the DNS Settings page, click **Add Record**, configure the parameters, and click **OK**.
Example:
Record Type: TXT
Host: @
Record value: v=spf1 include the following:spf.qiye.aliyun.com -all
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. Wait for the record to take effect. Verify your configuration by following How to query trusted IP addresses in an SPF record.