INFO: Using SPF (Sender Policy Framework) with SEG

Expand / Collapse

This article applies to:

  • Trustwave MailMarshal (SEG) 6.2.x and above


  • How can I configure Trustwave MailMarshal (SEG) to use the Sender Policy Framework (SPF)?
  • Where can I find information about SPF?


Trustwave SEG implements validation of email using the Sender Policy Framework (SPF).

SEG provides two ways to take action based on SPF results.


You can evaluate SPF as a Content Analysis (standard) rule condition. Messages that fail SPF evaluations can be quarantined. This option suits most customers. In current versions of SEG, default rules are present for this option and you can simply enable the rules.

To evaluate SPF in Content Analysis rules:
  1. Enable a Connection rule for SPF. Select the option "log only" with a rule action of "continue processing rules". This collects the required information for later use. (Default rule: Connection Policies > Sender Policy Framework Check)
  2. In a Content Analysis rule, use the rule condition Where message is categorized as Sender Policy Framework (SPF.xml). (Default rule: Anti-Spam > Sender Policy Framework Check)

By default, messages fail SPF evaluation if they attract a SPF result of Fail, SoftFail, TempError, or PermError.

You can also create customized SPF evaluations in Content Analysis rules by copying and editing the file SPF.xml. This is an advanced procedure requiring knowledge of the SPF standard and Regular Expressions.

Block at the Receiver

You can evaluate SPF as a Connection (receiver) rule condition. You can reject messages based on your choice of SPF results. For detailed information about using this rule condition, see Help for the rule condition Where the SPF Evaluation result is...


  • When a Connection rule is set to "log only", the SEG connection log records the SPF result based on HELO name evaluation. Content Analysis rules check SPF using From domain evaluation by default. Results of these two evaluations can differ.
    • For example if the mail source is a managed service such as Trustwave SEG Cloud or Office 365, the HELO name reflects the service provider's domain, while the From domain is the customer's (sender's) domain.
  • SEG implements the standard for SPF, as specified in RFC 4408.
  • To learn more about SPF options and recommendations, and to find general explanations of SPF, try the Sender Policy Framework website.

To contact Trustwave about this article or to request support:

Rate this Article:

Add Your Comments

Comment submission is disabled for anonymous users.
Please send feedback to Trustwave Technical Support or the Webmaster