Technical Tip: Exclude a specific sender matching the recipient policy
Description
This article describes how to exclude a specific sender that matches a Recipient Policy.
Scope
FortiMail v8.0.
Solution
Enable the option and configure the recipient rule parameters.
In the GUI:
Navigate to Policy -> Recipient Policy -> New -> Enable Sender Exclusion -> Choose 'Type' -> Enter the value.

In the CLI:
config policy recipient
(recipient) # edit 1
(1) # set sender-exclusion-status enable
(1) # set sender-exclusion-type user-wildcard
(1) # set sender-exclusion-name user2
(1) # set sender-exclusion-domain lab.local
(1) # end
Confirm the Created Rule.

Results:
In this test, a Recipient Policy is created to apply a specific filter on the Antispam profile -> banned word for the entire domain *@lab.local Except user2@lab.local.
Matching the Configured Rule and applying a banned word action:

It is excluded from the configured rule and the email is accepted:

Note: Sender Exclusion does not stop policy evaluation. Instead, FortiMail skips the matching Recipient Policy when the sender is excluded and continues evaluating the remaining policies in the list.
