Skip to main content
icianci
Staff
Staff
June 17, 2026

Troubleshooting Tip: SPF action not applied in FortiMail

  • June 17, 2026
  • 1 reply
  • 71 views

Description

This article describes how to troubleshoot why the SPF check fails, but corresponding actions are not applied in FortiMail.

Scope

FortiMail.

Solution

Spam email has been received from a spoofed IP address that is not in the SPF list for the related domain. 

In FortiMail configuration, SPF check is enabled and the related action is set to 'Discard':

8145baff.png


However, the email is not discarded and it is passed with the 'Modify Subject;Quarantine;Insert Disclaimer' action.

This action corresponds to the default action defined in the above antispam profile, named 'User Quarantine':

37c3f2df.png


Default actions are overridden when a different action is specified on a technique-by-technique basis.

To troubleshoot why SPF-specific actions are not applied, check:

  1. If DKIM and DMARK scan configuration options are also enabled:

When DMARK is enabled, it performs email authentication with SPF and DKIM. 
If either the SPF or DKIM verification succeeds, then DMARC verification succeeds.
If both of them fail, then DMARC verification fails.
About the action, for SPF and DKIM, the 'Discard' action has been configured, but for DMARK, the configured action is 'Reject', and this action 'wins' against the other two.

c2d5f7e5.png


  1. Check cross-search logs, according to Technical Tip: How to effectively archive cross-search logs, for detecting which anispam check is triggering the action. In this example, the log search shows 'FortiGuard AntiSpam' as a classifier and 'Modify Subject;Quarantine;Insert Disclaimer' as an action. 


Check classifier action in the Scan configuration in the AntiSpam profile. In this example:

a548573a.png

Check this document: How FortiMail processes email. When one of the antispam checks is triggered, FortiMail performs the associated action and skips the remaining antispam checks. In this case, the 'FortiGuard AntiSpam' check is done before the DMARK (SPF and DKIM) check. 

f9a210c7.png


In conclusion, the SPF check fails, but it is correct that FortiMail does not apply the related action. 


Related documents:

1 reply

ITAbteilung
New Member
June 25, 2026

This is just plain wrong and dangerous.. SPF should take presedence over ALL other checks. If one sends an email from an IP that is not included in a spf record it should always be rejected no matter what any other check results in.

The way it is now allows faked sender e-mails in a user releasable quarantine.