Description | This article demonstrates the use of regular expression on FortiGate to block an email sourced from a specific domain like .co while allowing emails from .com domain. |
Scope | FortiGate. |
Solution |
Configure a regular expression pattern '.*(co)\b' to match emails belonging to only .co domain. edit 1 set name "dotco-bal" edit 1 set type email-from next end next end
Map the block-allow-list to an antispam profile.
# config emailfilter profile edit "BlockDotCO" set comment '' set log-all disable end set log-all disable end set log-all disable end set log-all disable end set log-all disable end set log-all disable end next end
Now, apply this antispam profile to a PROXY-BASED Firewall policy. are currently not supported in flow inspection mode. For more information about the block-allow-list feature on FortiGate, refer to |