# alimail-email-delivery

Part of **ALIMAIL**

<!-- intent-backlink:auto -->

> 💡 **Path Selection**: This skill is one implementation path for the following routing skills. If you're unsure which path to take, check the corresponding routing skill:

> - [Troubleshoot why an email was not received](../../intent/alimail-troubleshoot-received/SKILL.md)
> - [Resolve email sending failure issues](../../intent/alimail-resolve-failure/SKILL.md)

# Alibaba Mail Email Delivery Troubleshooting Guide

## Problem Index

| Problem | Symptom | Severity | Solution Summary |
|--------|--------|---------|------------------|
| Sending to External Domains Fails Due to Weak Password | `554 Reject by behaviour spamANTISPAM_BAT[...]` | High | Change account password to a complex format with uppercase, lowercase, numbers, and special characters |
| Emails Rejected Due to Missing or Invalid SPF Record | `550 failed to meet SPF requirements` or `SPF check failed` | High | Add or correct the TXT record for SPF in DNS to include Alibaba Mail's sending IPs |
| Cannot Receive Emails Due to MX Record Misconfiguration | Bounce: "this user doesn't have a e-mail account" or `554` delivery error | High | Verify and fix MX records via Alibaba Mail console; ensure DNS propagation |
| Recipient Blocks Sender via Blacklist | `You are not allowed to send emails to the account` | Medium | Contact recipient to remove sender from blacklist or disable filtering rule |
| Outgoing Email Permission Disabled | `Permission for sending emails to external domains is disabled` or `550-5.7.1` | Medium | Administrator must enable "Send to External Domains" in Employee Account Management |
| Email Rejected by Auditor | Return message: "auditor does not approve to send this email" | Medium | Remove prohibited content (e.g., ads, PII) and resubmit for approval |

## Problem Details

### Problem 1: Sending to External Domains Fails Due to Weak Password

**Symptoms**
- Error message: `554 Reject by behaviour spamANTISPAM_BAT[01201311R6868S2030124234, c01c14424]`
- Behavior: User cannot send any email to external domains (e.g., Gmail, QQ Mail)
- Context: Occurs when account uses a simple password (e.g., only letters or short length)

**Root Cause**
Alibaba Mail enforces anti-spam measures that restrict outgoing email volume for accounts with weak passwords. This is a system-level behavior-based spam control triggered by password simplicity.

**Solution**
1. Log in to your Alibaba Mail account.
2. Navigate to **Account Settings** > **Security** > **Change Password**.
3. Set a **complex password** that includes:
   - At least 8 characters
   - Uppercase letters (A–Z)
   - Lowercase letters (a–z)
   - Numbers (0–9)
   - Special characters (e.g., `!@#$%^&*`)
4. Save the new password.

**Verification**
- Attempt to send a test email to an external domain (e.g., `test@gmail.com`).
- The email should be delivered without a bounce or `554` error.

### Problem 2: Emails Rejected Due to Missing or Invalid SPF Record

**Symptoms**
- Error message: `550 failed to meet SPF requirements`
- Alternative error: `554 Reject by behaviour spamANTISPAM_BAT[012****R196a, c0****42]` with "SPF check failed"
- Behavior: Recipient servers reject emails claiming they fail SPF authentication
- Context: Occurs when sending from a custom domain (e.g., `user@yourcompany.com`)

**Root Cause**
The sender’s domain lacks a valid SPF (Sender Policy Framework) TXT record in DNS, or the record does not authorize Alibaba Mail’s sending infrastructure. Recipient servers verify the sending IP against the SPF record and reject if unauthorized.

**Solution**
1. Access your domain’s DNS management console (e.g., Alibaba Cloud DNS, GoDaddy, etc.).
2. Add or update a **TXT record** for your domain with the following value:
   ```text
   v=spf1 include:aliyun-inc.com ~all
   ```
3. Ensure the record is published at the root of your domain (e.g., `yourcompany.com`, not `mail.yourcompany.com`).
4. Wait for DNS propagation (typically 5–60 minutes).

**Verification**
- Use an online SPF validator (e.g., MXToolbox SPF Checker) to confirm the record is live.
- Send a test email to an external address and confirm delivery.

### Problem 3: Cannot Receive Emails Due to MX Record Misconfiguration

**Symptoms**
- Bounce message: `"dd this user doesn't have a e-mailaccount"`
- Error code: `554` indicating recipient account does not exist
- Behavior: Can send emails but cannot receive any incoming messages
- Context: After domain setup or DNS changes

**Root Cause**
The domain’s MX (Mail Exchanger) record is missing, incorrect, or not yet propagated. Without a valid MX record pointing to Alibaba Mail servers, external senders cannot route emails to your mailbox.

**Solution**
1. Log on to the [Alibaba Mail console](https://alimail.console.aliyun.com/).
2. In the left navigation pane, click **Mailbox List**.
3. Find your mailbox and click **Manage**.
4. On the **Basic Information** tab, click **Check Domain Name Resolution**.
5. If the check fails:
   - Confirm your domain’s MX records match Alibaba Mail’s requirements:
```text
     mx1.imm.aliyun.com (priority 10)
     mx2.imm.aliyun.com (priority 20)
     ```
   - Ensure the domain has not expired.
6. Update DNS records if needed and wait for propagation.

**Verification**
- Run the **Check Domain Name Resolution** tool again after 10 minutes.
- Ask a colleague to send a test email; it should arrive without bouncing.

### Problem 4: Recipient Blocks Sender via Blacklist

**Symptoms**
- Error message: `You are not allowed to send emails to the account`
- Behavior: Email bounces only when sent to a specific recipient
- Context: Recipient has manually blocked the sender

**Root Cause**
The recipient has added the sender’s email address to a personal blacklist or created a filtering rule that rejects messages from that address.

**Solution**
1. Contact the intended recipient through an alternate channel (e.g., phone, chat).
2. Request that they:
   - Remove your email address from their **blocked senders list**, or
   - Delete or modify any email filtering rules targeting your address.
3. Resend the email after confirmation.

**Verification**
- The next email sent to the recipient should be delivered successfully.

### Problem 5: Outgoing Email Permission Disabled

**Symptoms**
- Error during send: `Permission for sending emails to external domains is disabled`
- Alternative error: `550-5.7.1 ... restricted from sending to foreign domains`
- Behavior: Internal emails work, but external sends fail

**Root Cause**
The mailbox account is configured by the administrator to block outgoing emails to external domains as a security or policy measure.

**Solution**
1. Log in to the [Alibaba Mail domain management console](https://qiye.aliyun.com/admin/#/home) as an administrator.
2. Navigate to **Organization and Users** > **Employee Account Management**.
3. Click the target mailbox account.
4. In the account settings form:
   - Set **Send to External Domains** to **Allow**
   - (Optionally) Set **Receive from External Domains** to **Allow** if needed
5. Click **Save**.

**Verification**
- The affected user should now be able to send emails to external addresses (e.g., `user@gmail.com`).

### Problem 6: Email Rejected by Auditor

**Symptoms**
- Return email content: `the auditor does not approve to send this email`
- Behavior: Email is blocked before delivery due to content review
- Context: Organization has enabled email compliance auditing

**Root Cause**
The email contains content flagged by the organization’s auditor, such as advertising material, sensitive personal data (PII), financial information, or other regulated content that violates internal policies.

**Solution**
1. Review the email content for prohibited elements:
   - Marketing or promotional language
   - Unencrypted PII (e.g., ID numbers, bank details)
   - Confidential corporate data
2. Remove or redact sensitive content.
3. If unsure, contact your organization’s compliance officer or auditor for clarification.
4. Resend the revised email.

**Verification**
- The email should be accepted by the auditor and delivered to the recipient.

## FAQ

**Q: How do I check if my MX records are correctly configured?**  
A: Log in to the Alibaba Mail console, go to **Mailbox List > Manage > Basic Information**, and click **Check Domain Name Resolution**. This tool validates MX, SPF, and other DNS records.

**Q: What permissions are required to send emails to external domains?**  
A: The mailbox must have **Send to External Domains** enabled by an administrator in **Employee Account Management**. Additionally, the account password must be complex to avoid anti-spam throttling.

**Q: Why are my emails being rejected with Error 552 or 553?**  
A: These errors indicate the recipient’s mail server rejected your message due to anti-spam policies, content filtering, or size limits. Contact the recipient or their email provider for specifics, as Alibaba Mail cannot override external server rules.

**Q: How can I prevent SPF-related delivery failures?**  
A: Ensure your domain has a valid SPF TXT record that includes `include:aliyun-inc.com`. Avoid publishing multiple SPF records—merge all mechanisms into a single record.

**Q: What should I do if I’ve fixed an issue but emails still aren’t delivering?**  
A: Wait for DNS propagation (up to 60 minutes), then send a test email. If problems persist, collect the full bounce message, sender/recipient addresses, and timestamp, and open a support ticket via the Alibaba Cloud console.