Description | This article describes how to configure an email filter profile on a FortiGate to detect, tag, and manage spam across different email protocols such as IMAP, POP3, and SMTP; and troubleshoot the FortiGuard spam filtering options like IP address check, URL check, etc. are not getting saved even when okay is pressed. |
Scope | FortiGate, v7.4.3, v7.2.4. |
Solution |
Initial Configuration: In certain scenarios, enabling and configuring email filtering on FortiGate helps manage spam effectively and adds another layer of security to email communication. The steps below illustrate how to configure the email filter profile and utilize features like FortiGuard spam filtering and local spam filtering.
Enable Email Filtering Feature: To ensure all required features are visible:
Create Email Filtering:
Configure Spam Detection by Protocol:
Enable FortiGuard Spam Filtering:
Configure Local Spam Filtering:
Optional Enhancements:
Once the Block/Allow lists will be checked after the HELO DNS: to overcome the HELO DNS, the local-override has to be enabled from the email_filter profile for the local-based email filtering. Unfortunately, only the SMTP has the option of using the local override instead of IMAP/POP3/GMAIL. Aside from SMTP, other protocols may have the option to use tag-only in the action.
Save and Apply to the Firewall Policy:
The configured email filter will tag and manage spam effectively, reducing risks from phishing or spam campaigns.
Troubleshooting: In a scenario, the user is using v7.2.3 and wants to add an Email Filter to the policy. When the user tries to enable the options, like 'URL check and IP address check' in the FortiGuard spam filtering section and presses okay, It does not get saved.
So in the GUI at the top, the option of Feature set is visible. It is necessary to change it to proxy-based and then, try enabling the option and saving it. Once back to the email filter, options are saved now.
In the FortiOS v7.2.4, those option is not visible in the GUI:
In this case, it is necessary to process it from CLI:
config emailfilter profile edit default
After changing it from the CLI, it will be possible to enable those options and save it.
If it is necessary for the license firewall policy, change the inspection mode to proxy to be able to see the security profile of the email filter just created.
config firewall policy edit x set inspection-mode proxy end
Follow this guide KB article to enable Anti-Spam/Email Filter logs: Technical Tip: How to enable email and spam filter logs
Once configured, the logs can be viewed from Log & Reports -> Security Events -> Anti-Spam.
Technical Tip: Mark as Spam and discard SPAM Email of a specific domain using AntiSpam profile and R... Technical Tip: 'Mark as Reject' not available in Anti-Spam Block/Allow List Entry |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.