AI Assistant
Help Center AI Assistant is now available
Got questions about Feishu? Use our AI chat to find the answers.
00:00
Click and hold to drag
Got It
Try Now

Admin | Set up mail flow rules

8 min read
I. Intro
🔖
Availability: Some of the features described in this article are in beta.
Who can perform these steps: Primary administrators or administrators with "Mail" permission.
As an administrator, you can create email flow rules in the Feishu Admin Console for incoming and outgoing emails. For example, you can create a rule to reject emails or change recipients based on set conditions.
II. Steps
  1. Set up rule name and scope
  1. Open the Feishu Admin Console and select Product Settings > Mail.
  1. Click Security and Anti-spam > Mail Flow > Create Rules.
250px|700px|reset
  1. Fill in the rule name, description, and the scope of the rule. Then, click Next.
🔖
Notice:
  • If you select Entire organization, the rule will apply to all members.
  • If you select Set range, you can further define the applicable scope and exclusion scope of this rule by members, departments, public mailboxes, mailing lists, or user groups (including dynamic user groups).
  • Note: The Add Exclusions feature is in beta.
250px|700px|reset
  1. Set rules for mail types
Under When the selected situations occur, select the email type to which you want to apply the rules. You can set rules for emails sent or received internally or externally.
🔖
Notice
  • "Internal messages" refers to emails sent and received from an organization's active domain or subdomain.
  • A mail flow rule can only be triggered if at least one of the recipients or the sender is within the current mail flow app scope. If only the cc or bcc recipients are within the email flow app scope, the rule will not be triggered.
  • The recipients and sender must be able to send and receive messages normally for the email flow rule to be triggered. When the original sending or receiving addresses are unavailable, such as when a domain is suspended or deleted, the email flow rule cannot be triggered.
  1. Add conditions
By setting specific conditions, the system can automatically identify the specified content in the email and determine whether the rules are triggered.
  1. Define the logical relationship of the filtering conditions. You can select any of the following conditions is met or all the following conditions are met.
  1. Click Add Condition, select the part of the email to search and the matching method, then enter keywords. You can add up to 10 conditions for a single rule.
Note: Refer to the tables below to learn more about different locations in an email as well as a description of matching methods.
  • Match location
Location
Description
Message body
The main body of an email. Does not include attachments.
Email subject
The email subject that appears in the email header.
Sender
The sender appears in the email header and the email envelope.
Recipient, Cc, or Bcc
The recipients displayed in the "To", "Cc", and "Bcc" sections of the email. You can select the specific matching content:
  • Address: For example, if the recipient is Joe Bloggs <Joebloggs@example.com>, match "Joebloggs@example.com". The account name "Joe Bloggs" is not within the matching scope.
  • Domain: For example, if the recipient is Joe Bloggs <Joebloggs@example.com>, match "example.com".
  • Total number of recipients:
  • Each email flow rule can only contain one condition based on the total number of "Recipients, CC, or BCC".
  • When calculating the total number of recipients, internal departments and mailing lists are calculated based on the actual number of members; external mailing lists are only counted as one recipient.
  • Matching method
Matching method
Description
contains
Searches locations for content that contains specific text or email addresses.
does not contain
Searches locations for content that does not contain specific text or email addresses.
is equal to
Searches locations for content that is an exact match for specific text or email addresses. Only 1 keyword or email address can be entered.
matches regular expression
Searches locations for content that matches a specific regular expression. You can enter up to 128 characters for a single regular expression.
Greater than
The rule is triggered when the number of recipients exceeds the specified value. Enter an integer for the matching condition.
This option appears only when the email types to which the rule is applied are selected as Sending to external mailboxes or Sending to internal mailboxes, and the matching location is selected as Total number of recipients, Cc, or Bcc.
  • Specific content matches
Specific content
Description
Sender IP within the following range
Sender IP refers to the server IP address of the sent email. This will only carry out sender IP matching on the received email.
Email content contains sensitive information
Searches the text content of the email subject and message body for matching selected sensitive information (such as an ID number or phone number).
  1. Actions taken when rules are triggered
Move to quarantine
You can move emails into quarantine so that administrators can review them. Administrators can then decide to either approve or reject them.
  • In the drop-down menu below The following actions will be carried out (Then do this), select Move to quarantine.
  • If you need the sender to be notified when the email is quarantined, select Notice the sender when message is moved to quarantine.
250px|700px|reset
Reject emails
You can reject an email before the recipient receives it.
  • In the drop-down menu below The following actions will be carried out (Then do this), select Reject the message.
  • You can set a custom message to notify the sender of the reason their email was rejected. Feishu will not apply any other flow rules after this action is taken.
250px|700px|reset
Modify emails
You can redirect emails, add more recipients, add email subject prefixes, or add headers when specified rules are triggered.
250px|700px|reset
Modification type
Description
Specific method
Redirect
Bypasses the original recipient and sends the email to a new recipient.
  • Redirect to others: You can choose to redirect to organization members, public mailboxes, mailing lists, or any email address. You can also redirect to multiple people. You can add up to 50 organization members, public mailboxes, or mailing lists, as well as up to 50 external email addresses.
  • Modify recipient's domain name: Only modifies the domain name of the recipient's email address, for example, "example.com." The user name will remain unchanged. Please enter the domain that should appear following the modification.
Example: An email's original recipient is jone@abc.com. By modifying the recipient's domain, the email will be redirected to jone@example.com.
Note:
  • When triggering a redirection to other recipients, all recipients displayed in the "To", "Cc", and “Bcc” sections will not receive the email.
  • When triggering a change to the recipient's domain, the domain of all recipients displayed in the "To", "Cc", and “Bcc” sections will be modified.
  • When triggering a redirection to other recipients or changing the recipient's domain, the email will be delivered to the modified recipients, but the recipient information displayed in the email will not change.
  • For example, if the original recipient is A, and B is cc'd, triggering a redirection to C. C will receive the email, but A and B will not. However, the email will still display A as the recipient and B as the Cc.
Add more recipients
You can send an email to additional recipients.
  • Select whether the type of additional recipient will be an ordinary recipient, CC, or BCC.
  • You can add up to 50 organization members, public mailboxes, or mailing lists, as well as up to 50 external email addresses for each type.
Add a prefix to the email subject
Add custom text to the start of an email subject.
Select this option and enter the custom text.
Example: You can enter "[External]" in emails that originate externally. If this rule is triggered by an email with the subject "Event Invite," the recipient will see the following subject: "[External] Event Invite."
Bypass spam filters
Emails sent to you will avoid spam filters even if the system detects them as spam.
Select Bypass spam filters.
Note: This action will not affect:
  • Sent emails
  • Emails received by mailing lists
  • Emails that trigger anti-phishing and spoofing policies
  • Emails that trigger custom "Move to spam" rules
Add customized header
Add customized headers for emails that match set conditions.
Enter headers and header values separately.
Request approval
When the Request approval option is selected, the email can only be sent if it is approved under the specified conditions.
💡
Notice: Approval is limited to sending actions only. When you select Sending to internal mailboxes or Sending to external mailboxes under When the selected situations occur, you can select Request approval.
  1. Select Request approval in the drop-down box of Then do this.
  1. Click Select approver. At least 2 approvers and at most 5 approvers need to be selected.
  1. Select Approval method.
  • Approval is granted only when all approvers have approved: The email can only be sent if all approvers approve.
  • Approval is granted when any one of the approvers has approved: The email can be sent as long as any one approver approves.
Approvers will receive a notification from the Approval bot. Approvers can view detailed information such as the body text of the email.
During the approval process, the sender will see the email status as either "Pending approval" or "Sending". The sender can also check the progress in the Approval Center.
Log rule activity only
💡
Notice
  • This feature is in beta.
  • It supports only sending actions. When you select Sending to internal mailboxes or Sending to external mailboxes under When the selected situations occur, you can select Log rule activity only.
When Log rule activity only is selected, emails that match the trigger conditions will be sent or received normally. However, these actions will be recorded in the audit log for future export and review. For detailed instructions on exporting and reviewing rule logs, see Mail flow rule log API (beta).
Note: When other actions such as modifying or rejecting messages are selected, the system will carry out the corresponding actions and log the event. When Log rule activity only is selected, the system only logs the event without performing any additional actions.
250px|700px|reset
  1. Set rule priorities
The rule priority determines the exection order of multiple rules. Rules will be executed in ascending order of the priority number. The rule with priority 0 will be executed first.
  1. Click More options to show priority settings.
  1. You can set the rule priority of all current rules. For example, if there are currently three rules, they will be carried out in order of priority from 0 to 2.
  • Note:
  • When an email hits rules that include actions such as Reject the message or Move to quarantine, the system will directly execute those actions and skip other actions. If multiple rules with Reject the message or Move to quarantine are triggered, only the rule with the highest priority will be executed.
  • When the rules hit by the email include the action of Request approval, that action will be directly executed. If the approval is passed, the email will continue to execute other actions in the order of priority. If the email hits multiple Request approval rules, the rule with the highest priority will be executed.
250px|700px|reset
  1. Click Create for the flow rule to take effect.
  1. Set log label (optional)
💡
Notice: This feature is in beta.
When a mail flow rule is triggered, the system will execute the corresponding action and log the rule event. You can add labels to these logs for easier filtering, exporting, viewing, or management later.
  1. At the bottom of the page, click More Options to expand the log label settings.
  1. Select an existing log label from the dropdown list, or click New Label at the bottom of the list to create a new one as needed.
Note: To delete an existing log label, click Manage Labels at the bottom of the list and remove the label that you want to delete.
250px|700px|reset
III. FAQs
What is the maximum number of mail flow rules?
An organization can have up to 100 mail flow rules.
If an email triggers both "Add more recipients" and "Redirect" rules, will the recipient who was added receive the email?
Yes.
Why do I get a prompt that the same rule already exists when I configure email flow rules?
When setting the trigger condition for an email flow rule and selecting Total number of recipients, CCs, or BCCs for the matching condition Total number of people, if the prompt that the same rule already exists appears, it indicates that a matching condition for the total number of recipients already exists in the current email flow rule. An email flow rule can include only one condition based on the total number of recipients, CCs, or BCCs.
Written by: Feishu Help Center
Updated on 2025/06/11
Was this content helpful?
Thank you for your feedback!
Need more help? Please contact Support.
0
rangeDom
rangeDom
rangeDom
rangeDom