All Products
Search
Document Center

Alibaba Mail:Email filtering

Last Updated:Aug 31, 2026

Set up email filtering rules to automatically bounce, delete, or flag emails that match specific criteria.

Note

This feature is not available in the Free Edition. For more information, see Version description.

What is email filtering?

Alibaba Mail email filtering protects corporate data by automatically acting on emails that match your rules. For example, delete emails containing "invoicing service" in the body.

Warning

Overly broad rules or simple conditions, such as a single keyword, may cause important emails to be flagged as spam or blocked.

Procedure

1. Log on to Alibaba Mail with the postmaster account and click Security Management > Mail Rules > Create Rule.

image

2. Configure the When all of the following conditions are met section. For more information, see Email Rules.

3. In the Perform the following operations section:

Select Email Filtering.

image

Configuration

Note

Name

The name of the email filter rule.

Status

The status of the rule:

Enabled: The rule is executed.

Disabled: The rule is not executed.

Scope

The accounts or departments affected by this rule:

All members: Applies to all accounts in the domain.

Specific departments and accounts: Applies to selected departments or accounts. Click Add Object to select them. Check Include sub-departments to include sub-department members.

Set exceptions: Exclude specific accounts or sub-departments from the rule.

Rule content

The filtering conditions. Matching emails are bounced, deleted, or marked as spam.

1.Applies to all emails: The rule applies to all incoming emails.

2.Internal/External:

From within the domain: Matches emails from senders within your domain.

From outside the domain: Matches emails from senders outside your domain.

3.Sender (the From field in the message header, not MAIL FROM): Matches by sender email address or domain name.

4.Recipient contains email address/domain name: Matches if the recipient list contains a specified address or domain name.

5.Recipient only contains email address/domain name: Matches if the recipient list contains only a specified address or domain name.

6.Number of recipient email addresses: Matches if the recipient count is within the specified range.

7.Number of recipient domain names: Matches if the recipient domain count is within the specified range.

8.Email size threshold: Matches if the email size is within the specified range.

9.Match keyword: Enter keywords, pressing Enter to separate them. Matching is case-sensitive.

Match sender name: The sender's display name or nickname.

Match subject: Matches keywords in the subject line.

Match body: Matches keywords in the message body.

Match attachment name: Matches keywords in attachment names.

10.All emails with attachments: Matches all emails that contain an attachment.

11.Exceptions: Exempt specific items from the rule.

Operation method

The action taken on matching emails.

Bounce email: Returns matching emails to the sender.

Mark as spam: Moves matching emails to the spam folder. The filtering rule takes precedence over the domain whitelist.

Delete immediately: Deletes matching emails immediately without notification. Also applies to emails flagged as spam.

Note
  • You can create up to 200 domain-level filtering rules.

  • Rules are prioritized by creation order. Earlier rules take precedence. For example, if an email matches both a spam rule and a bounce rule, the earlier rule's action is executed.

  • Domain names support wildcard characters, such as *.top.

  • If you add multiple email addresses to the same condition, the addresses are evaluated with OR logic: the rule is triggered if any one address matches. Different condition rows are evaluated with AND logic: the rule is triggered only if all condition rows are matched. To require that all addresses match before the rule triggers, create a separate rule for each address instead of adding multiple addresses to one condition.image