Fortinet white logo
Fortinet white logo

CLI Reference

profile antispam

profile antispam

Use this command to configure system-wide (or, if these commands are run from inside config domain, domain-specific) 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>

set action-default <action-profile_name>

set apply-action-default {enable | disable}

set scan-max-size <bytes_int>

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

set scan-pdf {enable | disable}

set fortiguard-antispam {enable | disable}

set action-fortiguard <action-profile_name>

set fortiguard-check-ip {enable | disable}

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

set fortiguard-phishing-url {enable | disable}

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

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

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

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

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 url-filter-status {enable | disable}

set url-filter <filter>

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

set url-filter-secondary <filter>

set action-url-filter <action-profile_name>

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

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

set greylist {enable | disable}

set action-grey-list <action-profile_name>

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-perm-error-status {enable | disable}

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

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

set action-spf-fail <action-profile_name>

set action-spf-neutral <action>

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-soft-fail <action-profile_name>

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

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 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 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 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 behavior-analysis {enable | disable}

set behavior-analysis {enable | disable}

set action-behavior-analysis <action-profile_name>

set bec-scan-status {enable | disable}

set impersonation-analysis {enable | disable}

set impersonation <profile_name>

set action-impersonation-analysis <action-profile_name>

set cousin-domain {enable | disable}

set cousin-domain-profile <cousin-profile_name>

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

set action-cousin -domain <action-profile-name>

set sender-alignment-status {enable | disable}

set action-sender-alignment <action-profile_name>

set heuristic {enable | disable}

set heuristic-rules-percent <percentage_int>

set heuristic-lower <threshold_int>

set heuristic-upper {threshold_int}

set action-heuristic <action-profile_name>

set surbl {enable | disable}

config surbl-server

edit <server_name>

set action-surbl <action-profile_name>

set dnsbl {enable | disable}

config dnsbl-server

edit <server_name>

set action-rbl <action-profile_name>

set deepheader-analysis {enable | disable}

set deepheader-check-ip {enable | disable}

set action-deep-header <action-profile_name>

set banned-word {enable | disable}

config bannedwords

edit <word_str>

set subject {enable | disable}

set body {enable | disable}

set action-banned-word <action_profile>

set safelist-enable {enable | disable}

set safelist-word {enable | disable}

config safelistwords

edit <word_str>

set subject {enable | disable}

set body {enable | disable}

set dictionary {enable | disable}

set dictionary-type

set dictionary-profile <profile_name>

set dict-score <score_int>

set action-dictionary <action-profile_name>

set image-spam {enable | disable}

set aggressive {enable | disable}

set action-image-spam <action-profile_name>

set bayesian {enable | disable}

set bayesian-usertraining {enable | disable}

set bayesian-autotraining {enable | disable}

set bayesian-user-db {enable | disable}

set action-bayesian <action-profile_name>

set suspicious-newsletter-status {enable | disable}

set action-suspicious-newsletter <action-profile_name>

set newsletter-status {enable | disable}

set action-newsletter <action-profile_name>

set virus {enable | disable}

set action-virus <action-profile_name>

end

Variable

Description

Default

<profile_name>

Enter the name of an antispam profile.

<server_name>

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

<server_name>

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

<word_str>

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

<word_str>

Enter the safelisted word to configure.

action-banned-word <action_profile>

Enter the action profile that you want the FortiMail unit to use if the banned word scan determines that the email is spam.

action-bayesian <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the Bayesian scan determines that the email is spam.

action-behavior-analysis <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the behavior analysis scan determines that the email is spam.

action-cousin -domain <action-profile-name>

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

action-deep-header <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the deep header scan determines that the email is spam.

action-default <action-profile_name>

Enter the default action profile that you want all scanners of the FortiMail unit to use. However, if you choose an action profile other than “default" for a scanner, this scanner will use the chosen profile.

action-dictionary <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the heuristic scan determines that the email is spam.

action-dkim-fail <action-profile_name> Enter the action profile that you want the FortiMail unit to use for DKIM check failure.

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

action-dkim-pass <action-profile_name>

Enter the action profile that you want the FortiMail unit to use for DKIM check pass.

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

Enter the action profile that you want the FortiMail unit to use if DNS server returns Temp error when querying the DKIM DNS record.

action-dmarc-fail <action-profile_name>

Enter the action profile that you want the FortiMail unit to use for DMARC check failure.

action-dmarc-none <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if no DMARC DNS record is not found or parsed correctly.

action-dmarc-pass <action-profile_name>

Enter the action profile that you want the FortiMail unit to use for DMARC check pass.

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

Enter the action profile that you want the FortiMail unit to use if DNS server returns Temp error when querying the DMARC DNS record.

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

Enter the action profile that you want the FortiMail unit to use if the FortiGuard block IP scan determines that the email is spam.

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

Enter the action profile that you want the FortiMail unit to use if the FortiGuard phishing URL scan determines that the email is spam.

action-fortiguard <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the FortiGuard Antispam scan determines that the email is spam.

action-grey-list <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the grey list scan determines that the email is spam.

action-heuristic <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the heuristic scan determines that the email is spam.

action-image-spam <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the image 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-ip-reputation-level1 <action-profile_name>

Enter the action profile that you want assigned to IP reputation level 1.

FortiGuard categorizes the 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 you want assigned to IP reputation level 2.

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

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

Enter the action profile that you want assigned to IP reputation level 3.

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

action-newsletter <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the newsletter scan determines that the email is spam.

action-rbl <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the DNSBL scan determines that the email is spam.

action-sender-alignment <action-profile_name>

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

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>

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-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-secondary <action-profile_name>

Enter the action profile that FortiMail uses if the URL filter 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-virus <action-profile_name>

Enter the action profile that requires the FortiMail unit to treat messages with viruses as 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 to perform the action in action-default <action-profile_name> immediately, without applying other antispam filters, if the email matches the IP or recipient policy.

disable

banned-word {enable | disable}

Enable to perform a banned words 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

bayesian {enable | disable}

Enable to perform a Bayesian scan.

disable

bec-scan-status {enable | disable}

Enable to perform a business email compromise (BEC) scan. Then configure which scans in cousin-domain {enable | disable}, impersonation-analysis {enable | disable}, and sender-alignment-status {enable | disable}.

disable

behavior-analysis {enable | disable}

Enable this option to activate behavior analysis scan for this antispam profile.

disable

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.

See also antispam behavior-analysis to adjust the BA aggressiveness level.

disable

body {enable | disable}

Enable to check the message body for the safelisted word.

disable

body {enable | disable}

Enable to check the message body for the banned word.

disable

cousin-domain-profile <cousin-profile_name>

Select which cousin domain profile to use.

This setting takes effect if cousin-domain {enable | disable} is enable.

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 headers.

This setting takes effect if cousin-domain {enable | disable} is enable.

header-detection body-detection auto-detection

cousin-domain {enable | disable}

Enable to perform a cousin domain (domain impersonation) scan. This detects domain names that are deliberately misspelled in order to appear to come from a trusted domain. Then also configure cousin-domain-profile <cousin-profile_name>, cousin-domain-scan-option {auto-detection body-detection header-detection}, and action-cousin -domain <action-profile-name>.

This setting takes effect if bec-scan-status {enable | disable} is enable.

disable

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.

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 setting is disabled, the FortiMail unit examines only the IP address of the current SMTP client.

This setting requires that you also configure either or both FortiGuard Antispam scan and DNSBL scan.

disable

dict-score <score_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>.

dictionary-profile <profile_name>

Enter the dictionary profile name.

dictionary-type

Enter the type of dictionary profile.

dictionary {enable | disable}

Enable to perform a dictionary scan for this profile.

disable

dkim-checking {enable | disable}

Enable to have the unit perform email authentication with DKIM checking. If either SPF check or DKIM check passes, DMARC check will pass. If both fail, 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 no DKIM DNS record is found, 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 Temp 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 for this profile. 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 to let the FortiMail unit 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 include 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 include 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-lower <threshold_int>

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_int}

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

10.000000

heuristic {enable | disable}

Enable to perform a heuristic scan.

disable

image-spam {enable | disable}

Enable to perform an image spam scan.

disable

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. Then also configure impersonation <profile_name>.

This setting takes effect if bec-scan-status {enable | disable} is enable.

disable

impersonation <profile_name>

Select which impersonation profile to use.

This setting takes effect if impersonation-analysis {enable | disable} is enable.

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

Enable IP reputation to enable the FortiMail unit to query the FortiGuard Antispam service to determine if the public IP address of the SMTP client is blocklisted.

FortiGuard categorizes the 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 IP reputation to enable the FortiMail unit to query the FortiGuard Antispam service to determine if the public IP address of the SMTP client is blocklisted.

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

disable

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

Enable IP reputation to enable the FortiMail unit to query the FortiGuard Antispam service to determine if the public IP address of the SMTP client is blocklisted.

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

disable

newsletter-status {enable | disable}

Enable dection of newsletters to make sure newsletters and other marketing campaigns 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 using words configured in <word_str>.

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 bytes for predefined profiles

600 bytes 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

sender-alignment-status {enable | disable}

Enable to scan for sender email address and name mismatches.

Sender alignment compares the sender email address in the message header (From:) with the SMTP envelope (MAIL FROM: to look for a mismatch, which is typical of spam.

If the sender email address fails the check, FortiMail takes the action in action-sender-alignment <action-profile_name>.

This setting takes effect if bec-scan-status {enable | disable} is enable.

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

Enable to temporarily hold suspicious email for a certain period of time (configurable with outbreak-protection-period under config system fortiguard antispam) 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 for the second time. This provides an opportunity for the FortiGuard antispam service to update its database in cases a spam outbreak occurs.

When set to monitor-only, email is not deferred. Instead, "X-FEAS-Spam-outbreak: monitor-only" is inserted as its header, 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 also specify different actions toward defferent SPS check results:

  • spf-fail-status: the 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: Header From and autorization domain mismatch.

  • spf-perm-error-status: SPF records are invalid.

  • spf-temp-error-status: Temporary proccessing 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-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.

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.

subject {enable | disable}

Enable to check the subject line for the safelisted word.

disable

subject {enable | disable}

Enable to check the subject line for the banned word.

disable

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-secondary-status {enable | disable}

Enable or disable the secondaryURI filter scan.

disable

url-filter-secondary <filter>

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-status {enable | disable}

Enable or disable URL filter scan.

disable

url-filter <filter>

Specify the URL filter to use.

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.

disable

Related topics

profile antispam-action

profile antivirus

profile antispam

profile antispam

Use this command to configure system-wide (or, if these commands are run from inside config domain, domain-specific) 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>

set action-default <action-profile_name>

set apply-action-default {enable | disable}

set scan-max-size <bytes_int>

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

set scan-pdf {enable | disable}

set fortiguard-antispam {enable | disable}

set action-fortiguard <action-profile_name>

set fortiguard-check-ip {enable | disable}

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

set fortiguard-phishing-url {enable | disable}

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

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

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

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

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 url-filter-status {enable | disable}

set url-filter <filter>

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

set url-filter-secondary <filter>

set action-url-filter <action-profile_name>

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

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

set greylist {enable | disable}

set action-grey-list <action-profile_name>

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-perm-error-status {enable | disable}

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

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

set action-spf-fail <action-profile_name>

set action-spf-neutral <action>

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-soft-fail <action-profile_name>

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

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 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 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 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 behavior-analysis {enable | disable}

set behavior-analysis {enable | disable}

set action-behavior-analysis <action-profile_name>

set bec-scan-status {enable | disable}

set impersonation-analysis {enable | disable}

set impersonation <profile_name>

set action-impersonation-analysis <action-profile_name>

set cousin-domain {enable | disable}

set cousin-domain-profile <cousin-profile_name>

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

set action-cousin -domain <action-profile-name>

set sender-alignment-status {enable | disable}

set action-sender-alignment <action-profile_name>

set heuristic {enable | disable}

set heuristic-rules-percent <percentage_int>

set heuristic-lower <threshold_int>

set heuristic-upper {threshold_int}

set action-heuristic <action-profile_name>

set surbl {enable | disable}

config surbl-server

edit <server_name>

set action-surbl <action-profile_name>

set dnsbl {enable | disable}

config dnsbl-server

edit <server_name>

set action-rbl <action-profile_name>

set deepheader-analysis {enable | disable}

set deepheader-check-ip {enable | disable}

set action-deep-header <action-profile_name>

set banned-word {enable | disable}

config bannedwords

edit <word_str>

set subject {enable | disable}

set body {enable | disable}

set action-banned-word <action_profile>

set safelist-enable {enable | disable}

set safelist-word {enable | disable}

config safelistwords

edit <word_str>

set subject {enable | disable}

set body {enable | disable}

set dictionary {enable | disable}

set dictionary-type

set dictionary-profile <profile_name>

set dict-score <score_int>

set action-dictionary <action-profile_name>

set image-spam {enable | disable}

set aggressive {enable | disable}

set action-image-spam <action-profile_name>

set bayesian {enable | disable}

set bayesian-usertraining {enable | disable}

set bayesian-autotraining {enable | disable}

set bayesian-user-db {enable | disable}

set action-bayesian <action-profile_name>

set suspicious-newsletter-status {enable | disable}

set action-suspicious-newsletter <action-profile_name>

set newsletter-status {enable | disable}

set action-newsletter <action-profile_name>

set virus {enable | disable}

set action-virus <action-profile_name>

end

Variable

Description

Default

<profile_name>

Enter the name of an antispam profile.

<server_name>

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

<server_name>

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

<word_str>

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

<word_str>

Enter the safelisted word to configure.

action-banned-word <action_profile>

Enter the action profile that you want the FortiMail unit to use if the banned word scan determines that the email is spam.

action-bayesian <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the Bayesian scan determines that the email is spam.

action-behavior-analysis <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the behavior analysis scan determines that the email is spam.

action-cousin -domain <action-profile-name>

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

action-deep-header <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the deep header scan determines that the email is spam.

action-default <action-profile_name>

Enter the default action profile that you want all scanners of the FortiMail unit to use. However, if you choose an action profile other than “default" for a scanner, this scanner will use the chosen profile.

action-dictionary <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the heuristic scan determines that the email is spam.

action-dkim-fail <action-profile_name> Enter the action profile that you want the FortiMail unit to use for DKIM check failure.

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

action-dkim-pass <action-profile_name>

Enter the action profile that you want the FortiMail unit to use for DKIM check pass.

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

Enter the action profile that you want the FortiMail unit to use if DNS server returns Temp error when querying the DKIM DNS record.

action-dmarc-fail <action-profile_name>

Enter the action profile that you want the FortiMail unit to use for DMARC check failure.

action-dmarc-none <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if no DMARC DNS record is not found or parsed correctly.

action-dmarc-pass <action-profile_name>

Enter the action profile that you want the FortiMail unit to use for DMARC check pass.

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

Enter the action profile that you want the FortiMail unit to use if DNS server returns Temp error when querying the DMARC DNS record.

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

Enter the action profile that you want the FortiMail unit to use if the FortiGuard block IP scan determines that the email is spam.

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

Enter the action profile that you want the FortiMail unit to use if the FortiGuard phishing URL scan determines that the email is spam.

action-fortiguard <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the FortiGuard Antispam scan determines that the email is spam.

action-grey-list <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the grey list scan determines that the email is spam.

action-heuristic <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the heuristic scan determines that the email is spam.

action-image-spam <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the image 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-ip-reputation-level1 <action-profile_name>

Enter the action profile that you want assigned to IP reputation level 1.

FortiGuard categorizes the 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 you want assigned to IP reputation level 2.

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

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

Enter the action profile that you want assigned to IP reputation level 3.

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

action-newsletter <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the newsletter scan determines that the email is spam.

action-rbl <action-profile_name>

Enter the action profile that you want the FortiMail unit to use if the DNSBL scan determines that the email is spam.

action-sender-alignment <action-profile_name>

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

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>

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-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-secondary <action-profile_name>

Enter the action profile that FortiMail uses if the URL filter 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-virus <action-profile_name>

Enter the action profile that requires the FortiMail unit to treat messages with viruses as 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 to perform the action in action-default <action-profile_name> immediately, without applying other antispam filters, if the email matches the IP or recipient policy.

disable

banned-word {enable | disable}

Enable to perform a banned words 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

bayesian {enable | disable}

Enable to perform a Bayesian scan.

disable

bec-scan-status {enable | disable}

Enable to perform a business email compromise (BEC) scan. Then configure which scans in cousin-domain {enable | disable}, impersonation-analysis {enable | disable}, and sender-alignment-status {enable | disable}.

disable

behavior-analysis {enable | disable}

Enable this option to activate behavior analysis scan for this antispam profile.

disable

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.

See also antispam behavior-analysis to adjust the BA aggressiveness level.

disable

body {enable | disable}

Enable to check the message body for the safelisted word.

disable

body {enable | disable}

Enable to check the message body for the banned word.

disable

cousin-domain-profile <cousin-profile_name>

Select which cousin domain profile to use.

This setting takes effect if cousin-domain {enable | disable} is enable.

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 headers.

This setting takes effect if cousin-domain {enable | disable} is enable.

header-detection body-detection auto-detection

cousin-domain {enable | disable}

Enable to perform a cousin domain (domain impersonation) scan. This detects domain names that are deliberately misspelled in order to appear to come from a trusted domain. Then also configure cousin-domain-profile <cousin-profile_name>, cousin-domain-scan-option {auto-detection body-detection header-detection}, and action-cousin -domain <action-profile-name>.

This setting takes effect if bec-scan-status {enable | disable} is enable.

disable

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.

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 setting is disabled, the FortiMail unit examines only the IP address of the current SMTP client.

This setting requires that you also configure either or both FortiGuard Antispam scan and DNSBL scan.

disable

dict-score <score_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>.

dictionary-profile <profile_name>

Enter the dictionary profile name.

dictionary-type

Enter the type of dictionary profile.

dictionary {enable | disable}

Enable to perform a dictionary scan for this profile.

disable

dkim-checking {enable | disable}

Enable to have the unit perform email authentication with DKIM checking. If either SPF check or DKIM check passes, DMARC check will pass. If both fail, 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 no DKIM DNS record is found, 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 Temp 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 for this profile. 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 to let the FortiMail unit 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 include 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 include 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-lower <threshold_int>

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_int}

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

10.000000

heuristic {enable | disable}

Enable to perform a heuristic scan.

disable

image-spam {enable | disable}

Enable to perform an image spam scan.

disable

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. Then also configure impersonation <profile_name>.

This setting takes effect if bec-scan-status {enable | disable} is enable.

disable

impersonation <profile_name>

Select which impersonation profile to use.

This setting takes effect if impersonation-analysis {enable | disable} is enable.

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

Enable IP reputation to enable the FortiMail unit to query the FortiGuard Antispam service to determine if the public IP address of the SMTP client is blocklisted.

FortiGuard categorizes the 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 IP reputation to enable the FortiMail unit to query the FortiGuard Antispam service to determine if the public IP address of the SMTP client is blocklisted.

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

disable

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

Enable IP reputation to enable the FortiMail unit to query the FortiGuard Antispam service to determine if the public IP address of the SMTP client is blocklisted.

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

disable

newsletter-status {enable | disable}

Enable dection of newsletters to make sure newsletters and other marketing campaigns 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 using words configured in <word_str>.

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 bytes for predefined profiles

600 bytes 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

sender-alignment-status {enable | disable}

Enable to scan for sender email address and name mismatches.

Sender alignment compares the sender email address in the message header (From:) with the SMTP envelope (MAIL FROM: to look for a mismatch, which is typical of spam.

If the sender email address fails the check, FortiMail takes the action in action-sender-alignment <action-profile_name>.

This setting takes effect if bec-scan-status {enable | disable} is enable.

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

Enable to temporarily hold suspicious email for a certain period of time (configurable with outbreak-protection-period under config system fortiguard antispam) 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 for the second time. This provides an opportunity for the FortiGuard antispam service to update its database in cases a spam outbreak occurs.

When set to monitor-only, email is not deferred. Instead, "X-FEAS-Spam-outbreak: monitor-only" is inserted as its header, 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 also specify different actions toward defferent SPS check results:

  • spf-fail-status: the 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: Header From and autorization domain mismatch.

  • spf-perm-error-status: SPF records are invalid.

  • spf-temp-error-status: Temporary proccessing 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-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.

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.

subject {enable | disable}

Enable to check the subject line for the safelisted word.

disable

subject {enable | disable}

Enable to check the subject line for the banned word.

disable

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-secondary-status {enable | disable}

Enable or disable the secondaryURI filter scan.

disable

url-filter-secondary <filter>

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-status {enable | disable}

Enable or disable URL filter scan.

disable

url-filter <filter>

Specify the URL filter to use.

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.

disable

Related topics

profile antispam-action

profile antivirus