Fortinet black logo

CLI Reference

profile antispam

profile antispam

Use this command to configure system-wide antispam profiles.

FortiMail can use many methods to detect spam, such as the FortiGuard Antispam service, DNSBL queries, Bayesian scanning, and heuristic scanning. Antispam profiles contain settings for these features that you may want to vary by policy. Depending on the feature, before you configure antispam policies, you may need to enable the feature or configure its system-wide settings.

Syntax

config profile antispam

edit <profile_name>

config bannedwords

edit <banned-word_str>

set subject {enable | disable}

set body {enable | disable}

config dnsbl-server

edit <dnsbl_name>

config safelistwords

edit <safelist-word_str>

set <safelist-word_str>

set body {enable | disable}

config surbl-server

edit <surbl_name>

set action-banned-word <action-profile_name>

set action-bayesian <action-profile_name>

set action-behavior-analysis <action-profile_name>

set action-deep-header <action-profile_name>

set action-default <action-profile_name>

set action-dictionary <action-profile_name>

set action-dkim-fail <action-profile_name>

set action-dkim-none <action-profile_name>

set action-dkim-pass <action-profile_name>

set action-dkim-temp-error <action-profile_name>

set action-dmarc-fail <action-profile_name>

set action-dmarc-none <action-profile_name>

set action-dmarc-pass <action-profile_name>

set action-dmarc-temp-error <action-profile_name>

set action-fortiguard <action-profile_name>

set action-fortiguard-blockip <action-profile-name>

set action-fortiguard-phishing-url <action-profile-name>

set action-grey-list <action-profile_name>

set action-heuristic <action-profile_name>

set action-image-spam <action-profile_name>

set action-impersonation-analysis <action-profile_name>

set action-ip-reputation-level1 <action-profile_name>

set action-ip-reputation-level2 <action-profile_name>

set action-ip-reputation-level3 <action-profile_name>

set action-newsletter <action-profile_name>

set action-rbl <action-profile_name>

set action-spf-fail <action-profile_name>

set action-spf-neutral <action-profile_name>

set action-spf-none <action-profile_name>

set action-spf-pass <action-profile_name>

set action-spf-perm-error <action-profile_name>

set action-spf-sender-alignment <action-profile_name>

set action-spf-soft-fail <action-profile_name>

set action-spf-temp-error <action-profile_name>

set action-surbl <action-profile_name>

set action-suspicious-newsletter <action-profile_name>

set action-url-filter <action-profile_name>

set action-url-filter-secondary <action-profile_name>

set action-virus <action-profile_name>

set action-weighted-analysis <action-profile-name>

set aggressive {enable | disable}

set apply-action-default {enable | disable}

set banned-word {enable | disable}

set bayesian {enable | disable}

set bayesian-autotraining {enable | disable}

set bayesian-user-db {enable | disable}

set bayesian-usertraining {enable | disable}

set behavior-analysis {enable | disable}

set cousin-domain {enable | disable}

set cousin-domain-profile <cousin-profile_name>

set cousin-domain-scan-option {auto-detection body-detection header-detection}

set deepheader-analysis {enable | disable}

set deepheader-check-ip {enable | disable}

set dictionary {enable | disable}

set dictionary-profile <profile_name>

set dictionary-type {group | profile}

set dict-score <threshold_int>

set dkim-checking {enable | disable}

set dkim-fail-status {enable | disable}

set dkim-none-status {enable | disable}

set dkim-pass-status {enable | disable}

set dkim-temp-error-status {enable | disable}

set dmarc-checking {enable | disable}

set dmarc-fail-status {enable | disable}

set dmarc-none-status {enable | disable}

set dmarc-pass-status {enable | disable}

set dmarc-temp-error-status {enable | disable}

set dnsbl {enable | disable}

set fortiguard-antispam {enable | disable}

set fortiguard-check-ip {enable | disable}

set fortiguard-phishing-url {enable | disable}

set bayesian {enable | disable}

set heuristic {enable | disable}

set heuristic-lower <threshold_float>

set heuristic-rules-percent <percentage_int>

set heuristic-upper {threshold_float}

set image-spam {enable | disable}

set impersonation <profile_name>

set impersonation-analysis {enable | disable}

set impersonation-status {enable | disable}

set ip-reputation-level1-status {enable | disable}

set ip-reputation-level2-status {enable | disable}

set ip-reputation-level3-status {enable | disable}

set newsletter-status {enable | disable}

set safelist-enable {enable | disable}

set safelist-word {enable | disable}

set scan-bypass-on-auth {enable | disable}

set scan-max-size <bytes_int>

set scan-pdf {enable | disable}

set spam-outbreak-protection {enable | disable | monitor-only}

set spf-checking {enable | disable}

set spf-fail-status {enable | disable}

set spf-neutral-status {enable | disable}

set spf-none-status {enable | disable}

set spf-pass-status {enable | disable}

set spf-sender-alignment-status {enable | disable}

set spf-perm-error-status {enable | disable}

set spf-soft-fail-status {enable | disable}

set spf-temp-error-status {enable | disable}

set surbl {enable | disable}

set suspicious-newsletter-status {enable | disable}

set url-filter <filter_name>

set url-filter-secondary <filter_name>

set url-filter-secondary-status {enable | disable}

set url-filter-status {enable | disable}

set virus {enable | disable}

set weighted-analysis-status {enable | disable}

set weighted-analysis-profile <profile_name>

end

Variable

Description

Default

<profile_name>

Enter the name of the profile.

<banned-word_str>

Enter the banned word. You can use wildcards to match multiple banned words. Regular expressions are not supported. For more information about wildcards and regular expressions, see the FortiMail Administration Guide.

subject {enable | disable}

Enable to scan the subject line for banned words.

disable

body {enable | disable}

Enable to scan the message body for banned words.

disable

<dnsbl_name>

Enter a DNSBL server name to perform a DNSBL scan. The FortiMail unit will query DNS blocklist servers.

<surbl_name>

Enter a SURBL server name to perform a SURBL scan. The FortiMail unit will query SURBL servers.

<safelist-word_str>

Enter the safelisted word. You can use wildcards to match multiple safelisted words. Regular expressions are not supported. For more information about wildcards and regular expressions, see the FortiMail Administration Guide.

subject {enable | disable}

Enable to scan the subject line for safelisted words.

disable

body {enable | disable}

Enable to scan the message body for safelisted words.

disable

action-banned-word <action-profile_name>

Enter the action profile that FortiMail uses if the banned word scan determines that the email is spam.

action-bayesian <action-profile_name>

Enter the action profile that FortiMail uses if the Bayesian scan determines that the email is spam.

action-behavior-analysis <action-profile_name>

Enter the action profile that FortiMail uses if the behavior analysis scan determines that the email is spam.

action-deep-header <action-profile_name>

Enter the action profile that FortiMail uses if the deep header scan determines that the email is spam.

action-default <action-profile_name>

Enter the default action profile for scans.

If you want a scan to use a different action profile, select it for that specific scan instead of accepting the default.

action-dictionary <action-profile_name>

Enter the action profile that FortiMail uses if the heuristic scan determines that the email is spam.

action-dkim-fail <action-profile_name> Enter the action profile that FortiMail uses if an email does not pass the DKIM scan.

action-dkim-none <action-profile_name> Enter the action profile that FortiMail uses if no DKIM DNS record is not found or parsed correctly.

action-dkim-pass <action-profile_name>

Enter the action profile that FortiMail uses if an email passes the DKIM scan.

action-dkim-temp-error <action-profile_name>

Enter the action profile that FortiMail uses if the DNS server returns a temporary error when querying the DKIM record.

action-dmarc-fail <action-profile_name>

Enter the action profile that FortiMail uses if an email does not pass the DMARC scan.

action-dmarc-none <action-profile_name>

Enter the action profile that FortiMail uses if no DMARC DNS record is not found or parsed correctly.

action-dmarc-pass <action-profile_name>

Enter the action profile that FortiMail uses if an email passes the DMARC scan.

action-dmarc-temp-error <action-profile_name>

Enter the action profile that FortiMail uses if DNS server returns Temp error when querying the DMARC DNS record.

action-fortiguard <action-profile_name>

Enter the action profile that FortiMail uses if the FortiGuard Antispam scan determines that the email is spam.

action-fortiguard-blockip <action-profile-name>

Enter the action profile that FortiMail uses if the FortiGuard block IP scan determines that the email is spam.

action-fortiguard-phishing-url <action-profile-name>

Enter the action profile that FortiMail uses if the FortiGuard phishing URL scan determines that the email is spam.

action-grey-list <action-profile_name>

Enter the action profile that FortiMail uses if the greylist scan determines that the email is spam.

action-heuristic <action-profile_name>

Enter the action profile that FortiMail uses if the heuristic scan determines that the email is spam.

action-impersonation-analysis <action-profile_name>

Enter the action profile that FortiMail uses if impersonation analysis determines that the email is from someone impersonating a known email address.

action-image-spam <action-profile_name>

Enter the action profile that FortiMail uses if the image scan determines that the email is spam.

action-ip-reputation-level1 <action-profile_name>

Enter the action profile that FortiMail uses if the IP reputation scan results is level 1. See set ip-reputation-level1-status {enable | disable}.

FortiGuard categorizes blocklisted IP addresses into three levels. Level 1 has the worst reputation and level 3 the best.

action-ip-reputation-level2 <action-profile_name>

Enter the action profile that FortiMail uses if the IP reputation scan result is level 2. See set ip-reputation-level2-status {enable | disable}

action-ip-reputation-level3 <action-profile_name>

Enter the action profile that FortiMail uses if the IP reputation scan result is level 3. See set ip-reputation-level3-status {enable | disable}.

action-newsletter <action-profile_name>

Enter the action profile that FortiMail uses if the newsletter scan determines that the email is spam.

action-rbl <action-profile_name>

Enter the action profile that FortiMail uses if the RBL scan determines that the email is spam.

action-spf-fail <action-profile_name>

Enter the action profile that FortiMail uses if the email does not pass the SPF scan, which means the host is not authorized to send messages.

action-spf-neutral <action-profile_name>

Enter the action profile that FortiMail uses if the SPF scan result is neutral, which means the SPF record is found but no definitive assertion.

action-spf-none <action-profile_name>

Enter the action profile that FortiMail uses if the SPF scan has no result, which means there is no SPF record.

action-spf-pass <action-profile_name>

Enter the action profile that FortiMail uses if email passes the SPF scan, which means the host is authorized to send a message.

action-spf-perm-error <action-profile_name>

Enter the action profile that FortiMail uses if the SPF scan has a permanent error, which means the SPF records are invalid.

action-spf-sender-alignment <action-profile_name>

Enter the action profile that FortiMail uses if the email does not pass the SPF sender alignment scan.

action-spf-soft-fail <action-profile_name>

Enter the action profile that FortiMail uses if the SPF scan has a soft failure, which means the host is not authorized to send messages, but it's not a strong statement.

action-spf-temp-error <action-profile_name>

Enter the action profile that FortiMail uses if the SPF scan has a temporary error, which means there is a processing error.

action-surbl <action-profile_name>

Enter the action profile that FortiMail uses if the SURBL scan determines that the email is spam.

action-suspicious-newsletter <action-profile_name>

Enter the action profile that FortiMail uses if the suspicious newsletter scan determines that the email is spam.

action-url-filter <action-profile_name>

Enter the action profile that FortiMail uses if the URL filter scan determines that the email is spam.

action-url-filter-secondary <action-profile_name>

Enter the action profile that FortiMail uses if the URL filter scan determines that the email is spam.

action-virus <action-profile_name>

Enter the action profile that FortiMail uses if the antivirus scan detects malware.

action-weighted-analysis <action-profile-name>

Enter the action profile that FortiMail uses if weighted analysis determines that the email is spam.

aggressive {enable | disable}

Enable this option to examine file attachments in addition to images embedded in the message body.

Tip: To improve performance, enable this option only if you do not have a satisfactory spam detection rate.

disable

apply-action-default {enable | disable}

Enable this option to apply default action to all messages.

disable

banned-word {enable | disable}

Enable to perform a banned words scan.

disable

bayesian {enable | disable}

Enable to perform a Bayesian scan.

disable

bayesian-autotraining {enable | disable}

Enable to use FortiGuard Antispam and SURBL scan results to train per-user Bayesian databases that are not yet mature (that is, they have not yet been trained with 200 legitimate email and 100 spam in order to recognize spam).

enable

bayesian-user-db {enable | disable}

Enable to use per-user Bayesian databases.

If disabled, the Bayesian scan will use either the global or the per-domain Bayesian database, whichever is selected for the protected domain.

disable

bayesian-usertraining {enable | disable}

Enable to accept email forwarded from email users to the Bayesian control email addresses in order to train the Bayesian databases to recognize spam and legitimate email.

enable

behavior-analysis {enable | disable}

Enable to analyze the similarities between uncertain email and known email in the behavior analysis (BA) database to determine whether the uncertain email is spam.

To adjust the aggressiveness of the scan, see also antispam behavior-analysis

disable

cousin-domain {enable | disable}

Enable to perform a cousin domain (domain impersonation) scan.

Note: For this setting to take effect, impersonation-status must be enable.

disable

cousin-domain-profile <cousin-profile_name>

Enter the cousin domain profile to use.

cousin-domain-scan-option {auto-detection body-detection header-detection}

Select where in the email to scan for domain name impersonation, either automatically, within the email body, and/or the message header.

header-detection body-detection auto-detection

deepheader-analysis {enable | disable}

Enable to inspect all message headers for known spam characteristics.

If the FortiGuard Antispam scan is enabled, this option uses results from that scan, providing up-to-date header analysis. For more information, see “set as profile modify fortishield" on page 184.

disable

deepheader-check-ip {enable | disable}

Enable to query for the blocklist status of the IP addresses of all SMTP servers appearing in the Received: message header.

If this option is disabled, the FortiMail unit examines only the IP address of the current SMTP client.

This option requires that you also configure either or both FortiGuard Antispam scan and DNSBL scan. See “set as profile modify fortishield" on page 184and “set as profile modify dnsbl" on page 181.

disable

dictionary {enable | disable}

Enable to perform a dictionary scan.

disable

dictionary-profile <profile_name>

Enter the dictionary profile or group of dictionary profiles to use, depending on which is indicated by dictionary-type.

dictionary-type {group | profile}

Select whether to apply a single dictionary profile, or a group of dictionary profiles.

profile

dict-score <threshold_int>

Enter the threshold for dictionary profile matches.

When the dictionary profile scans an email, it counts the number of matching words or phrases, and adjusts this total according to pattern-weight <weight_int> and pattern-max-weight <weight_int>. If the result equals or exceeds this threshold, then FortiMail applies the action in action-dictionary <action-profile_name>.

dkim-checking {enable | disable}

Enable to perform DKIM scan.

If either SPF or DKIM scans pass, then the DMARC scan will pass. If both fail, then DMARC fails.

disable

dkim-fail-status {enable | disable}

Enable or disable checking invalid DKIM body hash or signature.

enable

dkim-none-status {enable | disable}

Enable or disable checking for instances where the DNS server has no DKIM record, or the record could not be correctly parsed.

disable

dkim-pass-status {enable | disable}

Enable or disable DKIM check passing.

disable

dkim-temp-error-status {enable | disable}

Enable or disable checking for instances where DNS server returns a temporary error when querying the DKIM DNS record.

disable

dmarc-checking {enable | disable}

Enable to have the unit perform email authentication with SPF and DKIM checking. If either SPF check or DKIM check passes, DMARC check will pass. If both fail, DMARC fails.

enable

dmarc-fail-status {enable | disable}

Enable or disable DMARC check failing.

enable

dmarc-none-status {enable | disable}

Enable or disable checking for instances where no DMARC DNS record is found, or the record could not be correctly parsed.

disable

dmarc-pass-status {enable | disable}

Enable or disable DMARC check passing.

disable

dmarc-temp-error-status {enable | disable}

Enable or disable checking for instances where DNS server returns Temp error when querying the DMARC DNS record.

disable

dnsbl {enable | disable}

Enable to perform a DNSBL scan.

The FortiMail unit will query DNS blocklist servers defined using “set out_profile profile modify deepheader" on page 405.

disable

fortiguard-antispam {enable | disable}

Enable for the FortiMail unit to query the FortiGuard Antispam service to determine if any of the uniform resource identifiers (URL) in the message body are associated with spam. If any URL is blocklisted, the FortiMail unit considers the email to be spam, and you can select the action that the FortiMail unit will perform.

disable

fortiguard-check-ip {enable | disable}

Enable to perform a scan for whether or not the IP address of the SMTP client is blocklisted in the FortiGuard Antispam query.

disable

fortiguard-phishing-url {enable | disable}

Enable to perform a scan for whether or not the phishing URL is blocklisted in the FortiGuard Antispam query.

disable

greylist {enable | disable}

Enable to perform a greylist scan.

disable

heuristic {enable | disable}

Enable to perform a heuristic scan.

disable

heuristic-lower <threshold_float>

Enter the score equal to or below which the FortiMail unit considers an email to not be spam.

‑20.000000

heuristic-rules-percent <percentage_int>

Enter the percentage of the total number of heuristic rules that will be used to calculate the heuristic score for an email message.

The FortiMail unit compares this total score to the upper and lower level threshold to determine if an email is:

  • spam
  • not spam
  • indeterminable (score is between the upper and lower level thresholds)

To improve system performance and resource efficiency, enter the lowest percentage of heuristic rules that results in a satisfactory spam detection rate.

100

heuristic-upper {threshold_float}

Enter the score equal to or above which the FortiMail unit considers an email to be spam.

10.000000

image-spam {enable | disable}

Enable to perform an image spam scan.

disable

impersonation <profile_name>

Enter the impersonation profile that FortiMail uses to prevent email spoofing attacks.

impersonation-analysis {enable | disable}

Enable to perform a sender impersonation analysis scan. This automatically learns and tracks the mapping of display names and internal email addresses to prevent spoofing attacks.

Note: For this setting to take effect, impersonation-status must be enable.

disable

impersonation-status {enable | disable}

Enable to perform cousin domain, sender impersonation, and SPF sender alignment scans (if they are enabled).

Note: When you enable this setting, cousin-domain, impersonation-analysis, and spf-sender-alignment-status can take effect.

disable

ip-reputation-level1-status {enable | disable}

Enable to query the FortiGuard Antispam service about the reputation of the public IP address of the SMTP client to determine if it is blocklisted.

FortiGuard categorizes blocklisted IP addresses into three levels. Level 1 has the worst reputation and level 3 the best.

disable

ip-reputation-level2-status {enable | disable}

Enable to query the FortiGuard Antispam service about the reputation of the public IP address of the SMTP client to determine if it is blocklisted.

disable

ip-reputation-level3-status {enable | disable}

Enable to query the FortiGuard Antispam service about the reputation of the public IP address of the SMTP client to determine if it is blocklisted.

disable

newsletter-status {enable | disable}

Enable to detect newsletters and other marketing campaigns that are not spam.

safelist-enable {enable | disable}

Enable to automatically update personal safelist database from sent email.

disable

safelist-word {enable | disable}

Enable to perform a safelist word scan. The scan will examine the email for words configured in “set out_profile profile modify safelistwordlist" on page 426.

disable

scan-bypass-on-auth {enable | disable}

Enable to omit antispam scans when an SMTP sender is authenticated.

disable

scan-max-size <bytes_int>

Enter the maximum size, in bytes, that the FortiMail unit will scan for spam. Messages exceeding the limit will not be scanned for spam.

To scan all email regardless of size, enter 0.

1204
(for predefined profiles)

600
(for user-defined profiles)

scan-pdf {enable | disable}

Enable to scan the first page of PDF attachments using heuristic, banned word, and image spam scans, if they are enabled.

disable

spam-outbreak-protection {enable | disable | monitor-only}

Enable to temporarily hold suspicious email for a certain period of time (see outbreak-protection-period <minutes_int>) if the enabled FortiGuard Antispam check (block IP and/or URL filter) returns no result. After the specified time interval, FortiMail will query the FortiGuard server again. This provides an opportunity for the FortiGuard Antispam service to update its database when a spam outbreak occurs.

When set to monitor-only, email is not deferred. Instead, FortiMail inserts the message header X-FEAS-Spam-outbreak: monitor-only, and the email is logged.

disable

spf-checking {enable | disable}

Enable to have the FortiMail unit perform the action configured in this antispam profile, instead of the action configured in the session profile. See spf-validation {enable | disable}.

You can specify different actions toward different SPF check results:

  • spf-fail-status:Host is not authorized to send messages.
  • spf-soft-fail-status: Host is not authorized to send messages but not a strong statement.
  • spf-sender-alighnment-status: Domain name in the message header From: and SMTP AUTH command do not match.
  • spf-perm-error-status: SPF records are invalid.
  • spf-temp-error-status: Temporary processing error.
  • spf-pass-status: Host is authorized to send messages.
  • spf-neutral-status: SPF record is found but no definitive assertion.
  • spf-none-status: No SPF record.

disable

spf-fail-status {enable | disable}

Enable to make the FortiMail unit check if the host is not authorized to send messages.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-fail.

spf-neutral-status {enable | disable}

Enable to make the FortiMail unit check if the SPF record is found but no definitive assertion.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-neutral.

spf-none-status {enable | disable}

Enable to make the FortiMail unit check if there is no SPF record.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-none.

spf-pass-status {enable | disable}

Enable to make the FortiMail unit check if the host is authorized to send messages.

If the client IP address fails the SPF check, FortiMail takes the antispam action configured in action-spf-pass.

spf-sender-alignment-status {enable | disable}

Enable to make the FortiMail unit check if the header from the authorization domain is mismatched.

If the client IP address fails the SPF check, FortiMail takes the desired action entered in action-spf-sender-alignment.

Note: For this setting to take effect, impersonation-status must be enable.

spf-perm-error-status {enable | disable}

Enable to make the FortiMail unit check if the SPF records are invalid.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-perm-error.

spf-soft-fail-status {enable | disable}

Enable to make the FortiMail unit check if the host is not authorized to send messages but not a strong statement.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-soft-fail.

enable

spf-temp-error-status {enable | disable}

Enable to make the FortiMail unit check if there is a processing error.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-temp-error.

surbl {enable | disable}

Enable to perform a SURBL scan. The FortiMail unit will query SURBL servers defined using “set out_profile profile modify surblserver" on page 421.

disable

suspicious-newsletter-status {enable | disable}

Enable the detection of newsletters.

disable

url-filter <filter_name>

Enter the URL filter to use.

url-filter-secondary <filter_name>

To take different actions towards different URL filters/categories, you can specify a primary and a secondary filter, and specify different actions for each filter. If both URL filters match an email message, the primary filter action will take precedence.

url-filter-secondary-status {enable | disable}

Enable or disable the secondary URL filter scan.

disable

url-filter-status {enable | disable}

Enable or disable URL filter scan.

disable

virus {enable | disable}

Enable to treat email with viruses as spam. When enabled, instead of performing the action configured in the antivirus profile, the FortiMail unit will instead perform either the general or individualized action in the antispam profile. For details, see “set out_profile profile modify individualaction" on page 415and “set out_profile profile modify actions" on page 400.

disable

weighted-analysis-status {enable | disable}

Enable or disable the weighted analysis profile (also called "business email compromise (BEC)") scan.

disable

weighted-analysis-profile <profile_name>

Enter the weighted analysis profile to use.

Related topics

profile antispam-action

profile antivirus

profile cousin-domain

profile dictionary

profile weighted-analysis

system fortiguard antispam

profile antispam

Use this command to configure system-wide antispam profiles.

FortiMail can use many methods to detect spam, such as the FortiGuard Antispam service, DNSBL queries, Bayesian scanning, and heuristic scanning. Antispam profiles contain settings for these features that you may want to vary by policy. Depending on the feature, before you configure antispam policies, you may need to enable the feature or configure its system-wide settings.

Syntax

config profile antispam

edit <profile_name>

config bannedwords

edit <banned-word_str>

set subject {enable | disable}

set body {enable | disable}

config dnsbl-server

edit <dnsbl_name>

config safelistwords

edit <safelist-word_str>

set <safelist-word_str>

set body {enable | disable}

config surbl-server

edit <surbl_name>

set action-banned-word <action-profile_name>

set action-bayesian <action-profile_name>

set action-behavior-analysis <action-profile_name>

set action-deep-header <action-profile_name>

set action-default <action-profile_name>

set action-dictionary <action-profile_name>

set action-dkim-fail <action-profile_name>

set action-dkim-none <action-profile_name>

set action-dkim-pass <action-profile_name>

set action-dkim-temp-error <action-profile_name>

set action-dmarc-fail <action-profile_name>

set action-dmarc-none <action-profile_name>

set action-dmarc-pass <action-profile_name>

set action-dmarc-temp-error <action-profile_name>

set action-fortiguard <action-profile_name>

set action-fortiguard-blockip <action-profile-name>

set action-fortiguard-phishing-url <action-profile-name>

set action-grey-list <action-profile_name>

set action-heuristic <action-profile_name>

set action-image-spam <action-profile_name>

set action-impersonation-analysis <action-profile_name>

set action-ip-reputation-level1 <action-profile_name>

set action-ip-reputation-level2 <action-profile_name>

set action-ip-reputation-level3 <action-profile_name>

set action-newsletter <action-profile_name>

set action-rbl <action-profile_name>

set action-spf-fail <action-profile_name>

set action-spf-neutral <action-profile_name>

set action-spf-none <action-profile_name>

set action-spf-pass <action-profile_name>

set action-spf-perm-error <action-profile_name>

set action-spf-sender-alignment <action-profile_name>

set action-spf-soft-fail <action-profile_name>

set action-spf-temp-error <action-profile_name>

set action-surbl <action-profile_name>

set action-suspicious-newsletter <action-profile_name>

set action-url-filter <action-profile_name>

set action-url-filter-secondary <action-profile_name>

set action-virus <action-profile_name>

set action-weighted-analysis <action-profile-name>

set aggressive {enable | disable}

set apply-action-default {enable | disable}

set banned-word {enable | disable}

set bayesian {enable | disable}

set bayesian-autotraining {enable | disable}

set bayesian-user-db {enable | disable}

set bayesian-usertraining {enable | disable}

set behavior-analysis {enable | disable}

set cousin-domain {enable | disable}

set cousin-domain-profile <cousin-profile_name>

set cousin-domain-scan-option {auto-detection body-detection header-detection}

set deepheader-analysis {enable | disable}

set deepheader-check-ip {enable | disable}

set dictionary {enable | disable}

set dictionary-profile <profile_name>

set dictionary-type {group | profile}

set dict-score <threshold_int>

set dkim-checking {enable | disable}

set dkim-fail-status {enable | disable}

set dkim-none-status {enable | disable}

set dkim-pass-status {enable | disable}

set dkim-temp-error-status {enable | disable}

set dmarc-checking {enable | disable}

set dmarc-fail-status {enable | disable}

set dmarc-none-status {enable | disable}

set dmarc-pass-status {enable | disable}

set dmarc-temp-error-status {enable | disable}

set dnsbl {enable | disable}

set fortiguard-antispam {enable | disable}

set fortiguard-check-ip {enable | disable}

set fortiguard-phishing-url {enable | disable}

set bayesian {enable | disable}

set heuristic {enable | disable}

set heuristic-lower <threshold_float>

set heuristic-rules-percent <percentage_int>

set heuristic-upper {threshold_float}

set image-spam {enable | disable}

set impersonation <profile_name>

set impersonation-analysis {enable | disable}

set impersonation-status {enable | disable}

set ip-reputation-level1-status {enable | disable}

set ip-reputation-level2-status {enable | disable}

set ip-reputation-level3-status {enable | disable}

set newsletter-status {enable | disable}

set safelist-enable {enable | disable}

set safelist-word {enable | disable}

set scan-bypass-on-auth {enable | disable}

set scan-max-size <bytes_int>

set scan-pdf {enable | disable}

set spam-outbreak-protection {enable | disable | monitor-only}

set spf-checking {enable | disable}

set spf-fail-status {enable | disable}

set spf-neutral-status {enable | disable}

set spf-none-status {enable | disable}

set spf-pass-status {enable | disable}

set spf-sender-alignment-status {enable | disable}

set spf-perm-error-status {enable | disable}

set spf-soft-fail-status {enable | disable}

set spf-temp-error-status {enable | disable}

set surbl {enable | disable}

set suspicious-newsletter-status {enable | disable}

set url-filter <filter_name>

set url-filter-secondary <filter_name>

set url-filter-secondary-status {enable | disable}

set url-filter-status {enable | disable}

set virus {enable | disable}

set weighted-analysis-status {enable | disable}

set weighted-analysis-profile <profile_name>

end

Variable

Description

Default

<profile_name>

Enter the name of the profile.

<banned-word_str>

Enter the banned word. You can use wildcards to match multiple banned words. Regular expressions are not supported. For more information about wildcards and regular expressions, see the FortiMail Administration Guide.

subject {enable | disable}

Enable to scan the subject line for banned words.

disable

body {enable | disable}

Enable to scan the message body for banned words.

disable

<dnsbl_name>

Enter a DNSBL server name to perform a DNSBL scan. The FortiMail unit will query DNS blocklist servers.

<surbl_name>

Enter a SURBL server name to perform a SURBL scan. The FortiMail unit will query SURBL servers.

<safelist-word_str>

Enter the safelisted word. You can use wildcards to match multiple safelisted words. Regular expressions are not supported. For more information about wildcards and regular expressions, see the FortiMail Administration Guide.

subject {enable | disable}

Enable to scan the subject line for safelisted words.

disable

body {enable | disable}

Enable to scan the message body for safelisted words.

disable

action-banned-word <action-profile_name>

Enter the action profile that FortiMail uses if the banned word scan determines that the email is spam.

action-bayesian <action-profile_name>

Enter the action profile that FortiMail uses if the Bayesian scan determines that the email is spam.

action-behavior-analysis <action-profile_name>

Enter the action profile that FortiMail uses if the behavior analysis scan determines that the email is spam.

action-deep-header <action-profile_name>

Enter the action profile that FortiMail uses if the deep header scan determines that the email is spam.

action-default <action-profile_name>

Enter the default action profile for scans.

If you want a scan to use a different action profile, select it for that specific scan instead of accepting the default.

action-dictionary <action-profile_name>

Enter the action profile that FortiMail uses if the heuristic scan determines that the email is spam.

action-dkim-fail <action-profile_name> Enter the action profile that FortiMail uses if an email does not pass the DKIM scan.

action-dkim-none <action-profile_name> Enter the action profile that FortiMail uses if no DKIM DNS record is not found or parsed correctly.

action-dkim-pass <action-profile_name>

Enter the action profile that FortiMail uses if an email passes the DKIM scan.

action-dkim-temp-error <action-profile_name>

Enter the action profile that FortiMail uses if the DNS server returns a temporary error when querying the DKIM record.

action-dmarc-fail <action-profile_name>

Enter the action profile that FortiMail uses if an email does not pass the DMARC scan.

action-dmarc-none <action-profile_name>

Enter the action profile that FortiMail uses if no DMARC DNS record is not found or parsed correctly.

action-dmarc-pass <action-profile_name>

Enter the action profile that FortiMail uses if an email passes the DMARC scan.

action-dmarc-temp-error <action-profile_name>

Enter the action profile that FortiMail uses if DNS server returns Temp error when querying the DMARC DNS record.

action-fortiguard <action-profile_name>

Enter the action profile that FortiMail uses if the FortiGuard Antispam scan determines that the email is spam.

action-fortiguard-blockip <action-profile-name>

Enter the action profile that FortiMail uses if the FortiGuard block IP scan determines that the email is spam.

action-fortiguard-phishing-url <action-profile-name>

Enter the action profile that FortiMail uses if the FortiGuard phishing URL scan determines that the email is spam.

action-grey-list <action-profile_name>

Enter the action profile that FortiMail uses if the greylist scan determines that the email is spam.

action-heuristic <action-profile_name>

Enter the action profile that FortiMail uses if the heuristic scan determines that the email is spam.

action-impersonation-analysis <action-profile_name>

Enter the action profile that FortiMail uses if impersonation analysis determines that the email is from someone impersonating a known email address.

action-image-spam <action-profile_name>

Enter the action profile that FortiMail uses if the image scan determines that the email is spam.

action-ip-reputation-level1 <action-profile_name>

Enter the action profile that FortiMail uses if the IP reputation scan results is level 1. See set ip-reputation-level1-status {enable | disable}.

FortiGuard categorizes blocklisted IP addresses into three levels. Level 1 has the worst reputation and level 3 the best.

action-ip-reputation-level2 <action-profile_name>

Enter the action profile that FortiMail uses if the IP reputation scan result is level 2. See set ip-reputation-level2-status {enable | disable}

action-ip-reputation-level3 <action-profile_name>

Enter the action profile that FortiMail uses if the IP reputation scan result is level 3. See set ip-reputation-level3-status {enable | disable}.

action-newsletter <action-profile_name>

Enter the action profile that FortiMail uses if the newsletter scan determines that the email is spam.

action-rbl <action-profile_name>

Enter the action profile that FortiMail uses if the RBL scan determines that the email is spam.

action-spf-fail <action-profile_name>

Enter the action profile that FortiMail uses if the email does not pass the SPF scan, which means the host is not authorized to send messages.

action-spf-neutral <action-profile_name>

Enter the action profile that FortiMail uses if the SPF scan result is neutral, which means the SPF record is found but no definitive assertion.

action-spf-none <action-profile_name>

Enter the action profile that FortiMail uses if the SPF scan has no result, which means there is no SPF record.

action-spf-pass <action-profile_name>

Enter the action profile that FortiMail uses if email passes the SPF scan, which means the host is authorized to send a message.

action-spf-perm-error <action-profile_name>

Enter the action profile that FortiMail uses if the SPF scan has a permanent error, which means the SPF records are invalid.

action-spf-sender-alignment <action-profile_name>

Enter the action profile that FortiMail uses if the email does not pass the SPF sender alignment scan.

action-spf-soft-fail <action-profile_name>

Enter the action profile that FortiMail uses if the SPF scan has a soft failure, which means the host is not authorized to send messages, but it's not a strong statement.

action-spf-temp-error <action-profile_name>

Enter the action profile that FortiMail uses if the SPF scan has a temporary error, which means there is a processing error.

action-surbl <action-profile_name>

Enter the action profile that FortiMail uses if the SURBL scan determines that the email is spam.

action-suspicious-newsletter <action-profile_name>

Enter the action profile that FortiMail uses if the suspicious newsletter scan determines that the email is spam.

action-url-filter <action-profile_name>

Enter the action profile that FortiMail uses if the URL filter scan determines that the email is spam.

action-url-filter-secondary <action-profile_name>

Enter the action profile that FortiMail uses if the URL filter scan determines that the email is spam.

action-virus <action-profile_name>

Enter the action profile that FortiMail uses if the antivirus scan detects malware.

action-weighted-analysis <action-profile-name>

Enter the action profile that FortiMail uses if weighted analysis determines that the email is spam.

aggressive {enable | disable}

Enable this option to examine file attachments in addition to images embedded in the message body.

Tip: To improve performance, enable this option only if you do not have a satisfactory spam detection rate.

disable

apply-action-default {enable | disable}

Enable this option to apply default action to all messages.

disable

banned-word {enable | disable}

Enable to perform a banned words scan.

disable

bayesian {enable | disable}

Enable to perform a Bayesian scan.

disable

bayesian-autotraining {enable | disable}

Enable to use FortiGuard Antispam and SURBL scan results to train per-user Bayesian databases that are not yet mature (that is, they have not yet been trained with 200 legitimate email and 100 spam in order to recognize spam).

enable

bayesian-user-db {enable | disable}

Enable to use per-user Bayesian databases.

If disabled, the Bayesian scan will use either the global or the per-domain Bayesian database, whichever is selected for the protected domain.

disable

bayesian-usertraining {enable | disable}

Enable to accept email forwarded from email users to the Bayesian control email addresses in order to train the Bayesian databases to recognize spam and legitimate email.

enable

behavior-analysis {enable | disable}

Enable to analyze the similarities between uncertain email and known email in the behavior analysis (BA) database to determine whether the uncertain email is spam.

To adjust the aggressiveness of the scan, see also antispam behavior-analysis

disable

cousin-domain {enable | disable}

Enable to perform a cousin domain (domain impersonation) scan.

Note: For this setting to take effect, impersonation-status must be enable.

disable

cousin-domain-profile <cousin-profile_name>

Enter the cousin domain profile to use.

cousin-domain-scan-option {auto-detection body-detection header-detection}

Select where in the email to scan for domain name impersonation, either automatically, within the email body, and/or the message header.

header-detection body-detection auto-detection

deepheader-analysis {enable | disable}

Enable to inspect all message headers for known spam characteristics.

If the FortiGuard Antispam scan is enabled, this option uses results from that scan, providing up-to-date header analysis. For more information, see “set as profile modify fortishield" on page 184.

disable

deepheader-check-ip {enable | disable}

Enable to query for the blocklist status of the IP addresses of all SMTP servers appearing in the Received: message header.

If this option is disabled, the FortiMail unit examines only the IP address of the current SMTP client.

This option requires that you also configure either or both FortiGuard Antispam scan and DNSBL scan. See “set as profile modify fortishield" on page 184and “set as profile modify dnsbl" on page 181.

disable

dictionary {enable | disable}

Enable to perform a dictionary scan.

disable

dictionary-profile <profile_name>

Enter the dictionary profile or group of dictionary profiles to use, depending on which is indicated by dictionary-type.

dictionary-type {group | profile}

Select whether to apply a single dictionary profile, or a group of dictionary profiles.

profile

dict-score <threshold_int>

Enter the threshold for dictionary profile matches.

When the dictionary profile scans an email, it counts the number of matching words or phrases, and adjusts this total according to pattern-weight <weight_int> and pattern-max-weight <weight_int>. If the result equals or exceeds this threshold, then FortiMail applies the action in action-dictionary <action-profile_name>.

dkim-checking {enable | disable}

Enable to perform DKIM scan.

If either SPF or DKIM scans pass, then the DMARC scan will pass. If both fail, then DMARC fails.

disable

dkim-fail-status {enable | disable}

Enable or disable checking invalid DKIM body hash or signature.

enable

dkim-none-status {enable | disable}

Enable or disable checking for instances where the DNS server has no DKIM record, or the record could not be correctly parsed.

disable

dkim-pass-status {enable | disable}

Enable or disable DKIM check passing.

disable

dkim-temp-error-status {enable | disable}

Enable or disable checking for instances where DNS server returns a temporary error when querying the DKIM DNS record.

disable

dmarc-checking {enable | disable}

Enable to have the unit perform email authentication with SPF and DKIM checking. If either SPF check or DKIM check passes, DMARC check will pass. If both fail, DMARC fails.

enable

dmarc-fail-status {enable | disable}

Enable or disable DMARC check failing.

enable

dmarc-none-status {enable | disable}

Enable or disable checking for instances where no DMARC DNS record is found, or the record could not be correctly parsed.

disable

dmarc-pass-status {enable | disable}

Enable or disable DMARC check passing.

disable

dmarc-temp-error-status {enable | disable}

Enable or disable checking for instances where DNS server returns Temp error when querying the DMARC DNS record.

disable

dnsbl {enable | disable}

Enable to perform a DNSBL scan.

The FortiMail unit will query DNS blocklist servers defined using “set out_profile profile modify deepheader" on page 405.

disable

fortiguard-antispam {enable | disable}

Enable for the FortiMail unit to query the FortiGuard Antispam service to determine if any of the uniform resource identifiers (URL) in the message body are associated with spam. If any URL is blocklisted, the FortiMail unit considers the email to be spam, and you can select the action that the FortiMail unit will perform.

disable

fortiguard-check-ip {enable | disable}

Enable to perform a scan for whether or not the IP address of the SMTP client is blocklisted in the FortiGuard Antispam query.

disable

fortiguard-phishing-url {enable | disable}

Enable to perform a scan for whether or not the phishing URL is blocklisted in the FortiGuard Antispam query.

disable

greylist {enable | disable}

Enable to perform a greylist scan.

disable

heuristic {enable | disable}

Enable to perform a heuristic scan.

disable

heuristic-lower <threshold_float>

Enter the score equal to or below which the FortiMail unit considers an email to not be spam.

‑20.000000

heuristic-rules-percent <percentage_int>

Enter the percentage of the total number of heuristic rules that will be used to calculate the heuristic score for an email message.

The FortiMail unit compares this total score to the upper and lower level threshold to determine if an email is:

  • spam
  • not spam
  • indeterminable (score is between the upper and lower level thresholds)

To improve system performance and resource efficiency, enter the lowest percentage of heuristic rules that results in a satisfactory spam detection rate.

100

heuristic-upper {threshold_float}

Enter the score equal to or above which the FortiMail unit considers an email to be spam.

10.000000

image-spam {enable | disable}

Enable to perform an image spam scan.

disable

impersonation <profile_name>

Enter the impersonation profile that FortiMail uses to prevent email spoofing attacks.

impersonation-analysis {enable | disable}

Enable to perform a sender impersonation analysis scan. This automatically learns and tracks the mapping of display names and internal email addresses to prevent spoofing attacks.

Note: For this setting to take effect, impersonation-status must be enable.

disable

impersonation-status {enable | disable}

Enable to perform cousin domain, sender impersonation, and SPF sender alignment scans (if they are enabled).

Note: When you enable this setting, cousin-domain, impersonation-analysis, and spf-sender-alignment-status can take effect.

disable

ip-reputation-level1-status {enable | disable}

Enable to query the FortiGuard Antispam service about the reputation of the public IP address of the SMTP client to determine if it is blocklisted.

FortiGuard categorizes blocklisted IP addresses into three levels. Level 1 has the worst reputation and level 3 the best.

disable

ip-reputation-level2-status {enable | disable}

Enable to query the FortiGuard Antispam service about the reputation of the public IP address of the SMTP client to determine if it is blocklisted.

disable

ip-reputation-level3-status {enable | disable}

Enable to query the FortiGuard Antispam service about the reputation of the public IP address of the SMTP client to determine if it is blocklisted.

disable

newsletter-status {enable | disable}

Enable to detect newsletters and other marketing campaigns that are not spam.

safelist-enable {enable | disable}

Enable to automatically update personal safelist database from sent email.

disable

safelist-word {enable | disable}

Enable to perform a safelist word scan. The scan will examine the email for words configured in “set out_profile profile modify safelistwordlist" on page 426.

disable

scan-bypass-on-auth {enable | disable}

Enable to omit antispam scans when an SMTP sender is authenticated.

disable

scan-max-size <bytes_int>

Enter the maximum size, in bytes, that the FortiMail unit will scan for spam. Messages exceeding the limit will not be scanned for spam.

To scan all email regardless of size, enter 0.

1204
(for predefined profiles)

600
(for user-defined profiles)

scan-pdf {enable | disable}

Enable to scan the first page of PDF attachments using heuristic, banned word, and image spam scans, if they are enabled.

disable

spam-outbreak-protection {enable | disable | monitor-only}

Enable to temporarily hold suspicious email for a certain period of time (see outbreak-protection-period <minutes_int>) if the enabled FortiGuard Antispam check (block IP and/or URL filter) returns no result. After the specified time interval, FortiMail will query the FortiGuard server again. This provides an opportunity for the FortiGuard Antispam service to update its database when a spam outbreak occurs.

When set to monitor-only, email is not deferred. Instead, FortiMail inserts the message header X-FEAS-Spam-outbreak: monitor-only, and the email is logged.

disable

spf-checking {enable | disable}

Enable to have the FortiMail unit perform the action configured in this antispam profile, instead of the action configured in the session profile. See spf-validation {enable | disable}.

You can specify different actions toward different SPF check results:

  • spf-fail-status:Host is not authorized to send messages.
  • spf-soft-fail-status: Host is not authorized to send messages but not a strong statement.
  • spf-sender-alighnment-status: Domain name in the message header From: and SMTP AUTH command do not match.
  • spf-perm-error-status: SPF records are invalid.
  • spf-temp-error-status: Temporary processing error.
  • spf-pass-status: Host is authorized to send messages.
  • spf-neutral-status: SPF record is found but no definitive assertion.
  • spf-none-status: No SPF record.

disable

spf-fail-status {enable | disable}

Enable to make the FortiMail unit check if the host is not authorized to send messages.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-fail.

spf-neutral-status {enable | disable}

Enable to make the FortiMail unit check if the SPF record is found but no definitive assertion.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-neutral.

spf-none-status {enable | disable}

Enable to make the FortiMail unit check if there is no SPF record.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-none.

spf-pass-status {enable | disable}

Enable to make the FortiMail unit check if the host is authorized to send messages.

If the client IP address fails the SPF check, FortiMail takes the antispam action configured in action-spf-pass.

spf-sender-alignment-status {enable | disable}

Enable to make the FortiMail unit check if the header from the authorization domain is mismatched.

If the client IP address fails the SPF check, FortiMail takes the desired action entered in action-spf-sender-alignment.

Note: For this setting to take effect, impersonation-status must be enable.

spf-perm-error-status {enable | disable}

Enable to make the FortiMail unit check if the SPF records are invalid.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-perm-error.

spf-soft-fail-status {enable | disable}

Enable to make the FortiMail unit check if the host is not authorized to send messages but not a strong statement.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-soft-fail.

enable

spf-temp-error-status {enable | disable}

Enable to make the FortiMail unit check if there is a processing error.

If the client IP address fails the SPF check, FortiMail takes the antispam action entered in action-spf-temp-error.

surbl {enable | disable}

Enable to perform a SURBL scan. The FortiMail unit will query SURBL servers defined using “set out_profile profile modify surblserver" on page 421.

disable

suspicious-newsletter-status {enable | disable}

Enable the detection of newsletters.

disable

url-filter <filter_name>

Enter the URL filter to use.

url-filter-secondary <filter_name>

To take different actions towards different URL filters/categories, you can specify a primary and a secondary filter, and specify different actions for each filter. If both URL filters match an email message, the primary filter action will take precedence.

url-filter-secondary-status {enable | disable}

Enable or disable the secondary URL filter scan.

disable

url-filter-status {enable | disable}

Enable or disable URL filter scan.

disable

virus {enable | disable}

Enable to treat email with viruses as spam. When enabled, instead of performing the action configured in the antivirus profile, the FortiMail unit will instead perform either the general or individualized action in the antispam profile. For details, see “set out_profile profile modify individualaction" on page 415and “set out_profile profile modify actions" on page 400.

disable

weighted-analysis-status {enable | disable}

Enable or disable the weighted analysis profile (also called "business email compromise (BEC)") scan.

disable

weighted-analysis-profile <profile_name>

Enter the weighted analysis profile to use.

Related topics

profile antispam-action

profile antivirus

profile cousin-domain

profile dictionary

profile weighted-analysis

system fortiguard antispam