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
- Set up rule name and scope
- Open the Feishu Admin Console and select Product Settings > Mail.
- Click Security and Anti-spam > Mail Flow > Create Rules.
250px|700px|reset
- 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
- 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.
- Add conditions
By setting specific conditions, the system can automatically identify the specified content in the email and determine whether the rules are triggered.
- 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.
- 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
- Matching method
- Specific content matches
- 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
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.
- Select Request approval in the drop-down box of Then do this.
- Click Select approver. At least 2 approvers and at most 5 approvers need to be selected.
- 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
- 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.
- Click More options to show priority settings.
- 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
- Click Create for the flow rule to take effect.
- 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.
- At the bottom of the page, click More Options to expand the log label settings.
- 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