All Products
Search
Document Center

Alibaba Mail:Bounce email indicates "spf check failed"

Last Updated:Sep 18, 2025

Problem description

An email is bounced, and the system returns the following error:

554 Reject by behaviour spam at Rcpt State(Connection IP address:x.x.x.x)ANTISPAM_BAT[01201311R506a, ay29a033002195083]: spf
check failed CONTINUE (in reply to RCPT TO command)

Cause

The error message indicates that the Sender Policy Framework (SPF) authentication failed, which caused the email to be bounced.

The SPF authentication failed because the sending IP address is not in the range specified by the SPF record.

Solution

Make sure that you use the correct SMTP server address to send emails.

  • If you use an Alibaba Mail mailbox to send the email, see IMAP, POP, and SMTP server addresses and ports for Alibaba Mail.

    Check the DNS records for your domain name. Confirm that a TXT record with the value v=spf1 include the following:spf.sg.aliyun.com -all exists.

    If this record does not exist, or if its value is incorrect, add or modify the record.

    After the update, wait 10 to 20 minutes for the new record to take effect. Then, send a test email to confirm that the issue is resolved.

  • If you do not use an Alibaba Mail mailbox:

    Contact the administrator of your email service. Ask the administrator to add the sending IP address to the SPF record. Before you add the IP address, make sure it is a trusted, dedicated IP address to prevent email spoofing.

Singapore region

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

China (Hong Kong) region

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

Germany region

v=spf1 include the following:spf.de.alibabacloud.com -all

US region

v=spf1 include the following:spf.us.alibabacloud.com -all

Note

You can have only one SPF record. If you have multiple outbound IP addresses, merge them into a single record. Make sure that all IP addresses are trusted. If an IP address range is too large and includes IP addresses that do not belong to you, this creates an email spoofing threat.

Syntax examples for the record value:

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

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

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

Note: Use ip4, not ipv4.