Fortinet white logo
Fortinet white logo

CLI Reference

profile content

profile content

Use this command to create content profiles, which you can use to match email based upon its subject line, message body, and attachments.

Unlike antispam profiles, which deal primarily with spam, content profiles match any other type of email.

Content profiles can be used to apply content-based encryption to email. They can also be used to restrict prohibited content, such as words or phrases, file names, and file attachments that are not permitted by your network usage policy. As such, content profiles can be used both for email that you want to protect, and for email that you want to prevent.

Syntax

config profile content

edit <profile_name>

[set comment "<comment_str>"]

set action-default <content-action-profile_name>

set defersize <KB_int>

config attachment-scan

edit <index_int>

set status {enable | disable}

set operator {is | is-not}

set patterns {<file-type_name> ...}

set action <content-action-profile_name>

next

end

set detect-office-status {enable | disable}

set office-scan-option {detect-password-protected detect-embedded-component}

set detect-password-office-option {detect-only | attempt-to-decrypt }

set office-detect-embedded-option {check-msoffice check-msoffice-vba check-msvisio check-openofficecheck-pdf}

set detect-archive-status {enable | disable}

set archive-scan-option {detect-password-protected block-on-failure-to-decompress block-recursive}

set detect-password-archive-option {detect-only | attempt-to-decrypt }

set archive-max-recursive-level <threshold_int>

set decrypt-password-method {auto-decrypt prompt-user-input}

set decrypt-password-auto-option {built-in-password-list user-defined-password-list words-in-email-content}

set decrypt-password-num-of-words <words_int>

set decrypt-password-quarantine-type {system-quarantine | domain-quarantine}

set decrypt-password-quarantine-folder <folder_name>

set decrypt-password-notification-disclaimer <notification_name>

set scan-option {block-fragmented-email bypass-on-smtp-auth check-html-content check-max-num-of-attachment check-text-content policy-match}

set action-policy-match <content-action-profile_name>

set image-analysis-scan {enable | disable}

set image-classification-status {enable |disable}

set image-classification-profile <image-classification-profile_name>

set action-image-classification <content-action-profile_name>

set max-size-status {enable | disable}

set max-size <KB_int>

set max-size-option {message | attachment}

set action-max-size <content-action-profile_name>

set max-num-of-attachment <limit_int>

set html-content-action {convert-to-text | modify-content}

set html-active-content-action {keep | remove}

set html-hidden-content-action {keep | remove}

set html-content-url-selection {tag-attribute tag-content}

set html-content-url-action {click-protection | click-protection-isolator | isolator | keep | neutralize | remove}

set text-content-action {click-protection | click-protection-isolator | isolator | neutralize | remove-url}

set cdr-file-type-option {office pdf}

set cdr-office-metadata-action {keep | remove}

set action-cdr <content-action-profile_name>

config monitor

edit <index_int>

set status {enable | disable}

set dictionary-type {group | profile}

set dictionary-group <dictionary-group_name>

set dictionary-profile <dictionary-profile_name>

set dict-score <threshold_int>

set action <content-action-profile_name>

set scan-office {enable | disable}

set scan-pdf {enable | disable}

set scan-archive {enable | disable}

next

end

next

end

Variable

Description

Default

<index_int>

Enter the index number of the profile.

If the profile does not currently exist, it will be created.

<profile_name>

Enter the name of the profile.

To view a list of existing entries, enter a question mark ( ? ).

action-cdr <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for CDR features such as html-content-action {convert-to-text | modify-content}, select an action profile. See profile content-action.

action-default <content-action-profile_name>

Select a content action profile. See profile content-action.

This default setting applies only to sub-scans that do not have their own individually configured action, such as action-cdr <content-action-profile_name>.

action-image-classification <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for image classification, select an action profile. See profile content-action.

action-max-size <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for max-size <KB_int>, select an action profile. See profile content-action.

action-policy-match <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for a sender policy match, select an action profile. See profile content-action.

action <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for patterns {<file-type_name> ...}, select an action profile. See profile content-action.

action <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for dict-score <threshold_int>, select an action profile. See profile content-action.

archive-max-recursive-level <threshold_int>

Enter the maximum compression nesting depth. Valid range is 1-36. action-default <content-action-profile_name> will be applied if the file has too many layers of compression.

This setting applies only if block-recursive is selected in archive-scan-option {detect-password-protected block-on-failure-to-decompress block-recursive}.

12

archive-scan-option {detect-password-protected
block-on-failure-to-decompress
block-recursive}

Select whether to:

This setting applies only if detect-archive-status {enable | disable} is enable.

cdr-file-type-option {office pdf}

Select which file type(s) to apply content disarming and reconstruction (CDR) to:

  • office: Microsoft Office attachments, including embedded files inside of them(nested compression is not supported).
  • pdf: PDF attachments, including documents inside of archives (nested compression is not supported).

See also file content-disarm-reconstruct.

cdr-office-metadata-action {keep | remove}

Select whether to keep or remove potentially sensitive document property metadata. Also configure metadata-type-option {...}.

Currently DOCX, PPTX, and XLSX files are supported.

remove

comment "<comment_str>"

Enter a description or comment.

decrypt-password-auto-option {built-in-password-list
user-defined-password-list
words-in-email-content}

Select which kinds of password to try to automatically decrypt files:

  • built-in-password-list: Predefined list of common passwords as passwords for the attachment file. Predefined passwords are built-in and may be updated when the FortiMail software is updated

  • user-defined-password-list: Passwords that administrators configure for attachment files. To configure the passwords, see file decryption password.

  • words-in-email-content: Search for the word "password" in the email and try words around it as passwords for the attachment file. The password may be separated by a space character or:

    -,.:

    If the word "password" does not exist, then FortiMail tries words in the email body.

    Multiple languages are supported for the word "password". "Password" translations are built-in and may be updated when the FortiMail software is updated.

    For example, if the email has a sentence such as:

    To open the document, please use password: 123456. If you cannot open it, please contact us.”

    and if decrypt-password-num-of-words <words_int> is 2, then FortiMail tries these words in sequential order:

    1. please

    2. use

    3. 123456

    4. If

This setting applies only if auto-decrypt is selected in decrypt-password-method {auto-decrypt prompt-user-input}.

words-in-email-content

decrypt-password-method {auto-decrypt prompt-user-input}

Select which methods to try if an attachment file is password-protected:

This setting applies only if attempt-to-decrypt is selected in either or both:

auto-decrypt

decrypt-password-notification-disclaimer <notification_name>

Select which notification template to use for the file password prompt.

This setting applies only if decrypt-password-method {auto-decrypt prompt-user-input} is prompt-user-input.

default

decrypt-password-num-of-words <words_int>

Enter how many nearby words to try as the attachment file's password.

This setting applies only if you select words-in-email-content in decrypt-password-auto-option {built-in-password-list user-defined-password-list words-in-email-content}.

5

decrypt-password-quarantine-folder <folder_name>

Select which folder will be used to temporarily store email until the sender responds to the password prompt. To configure a quarantine folder, see <folder_name>.

This setting applies only if decrypt-password-method {auto-decrypt prompt-user-input} is prompt-user-input.

Content_PasswordProtected

decrypt-password-quarantine-type {system-quarantine | domain-quarantine}

Select whether to use the system-level or domain-level quarantine to temporarily store email while FortiMail waits for the sender to respond to the file password prompt.

This setting applies only if decrypt-password-method {auto-decrypt prompt-user-input} is prompt-user-input.

system-quarantine

defersize <KB_int>

Enter the attachment size threshold in kilobytes for deferred delivery. See also defer-delivery-starttime <time_str> and defer-delivery {enable | disable}.

To disable the limit, enter 0.

Alternatively, configure max-size <KB_int>.

0

detect-archive-status {enable | disable}

Enable to scan archives such as ZIP files according to archive-scan-option {detect-password-protected block-on-failure-to-decompress block-recursive}.

Disable to skip those scans.

Note: This setting does not enable or disable other archive settings in the content profile such as the content monitor setting scan-archive {enable | disable}.

disable

detect-office-status {enable | disable}

Enable to scan Microsoft Office, Open Office, and Adobe PDF files according to office-scan-option {detect-password-protected detect-embedded-component}.

Disable to skip those scans.

Note: This setting does not enable or disable other Office or PDF settings in the content profile, such as the CDR setting cdr-file-type-option {office pdf} and the content monitor settingsscan-office {enable | disable} and scan-pdf {enable | disable}.

disable

detect-password-archive-option {detect-only | attempt-to-decrypt }

Select either:

This setting applies only if detect-archive-status {enable | disable} is enable.

detect-only

detect-password-office-option {detect-only | attempt-to-decrypt }

Select either:

This setting applies only if detect-office-status {enable | disable} is enable.

detect-only

dict-score <threshold_int>

Enter the number of times that an email must match the dictionary profile before it will receive the action configured in action <content-action-profile_name>.

Note: The score is based on matches in each individual dictionary profile, not the total in dictionary-group <dictionary-group_name>.

1

dictionary-group <dictionary-group_name>

Select which dictionary profile group the content monitor profile will use to find matching text. See profile dictionary-group.

See also information on dictionary profiles.

dictionary-profile <dictionary-profile_name>

Select which dictionary profile the content monitor profile will use to find matching text.

See also information on dictionary profiles.

dictionary-type {group | profile}

Select which will be used to find matching text, either:

Also configure dict-score <threshold_int>.

group

html-active-content-action {keep | remove}

Select to either keep or remove scripts such as JavaScript.

This setting applies only if html-content-action {convert-to-text | modify-content} is modify-content.

remove

html-content-action {convert-to-text | modify-content}

Select either:

This setting applies only if check-html-content is selected in scan-option {block-fragmented-email bypass-on-smtp-auth check-html-content check-max-num-of-attachment check-text-content policy-match}.

modify-content

html-content-url-action {click-protection | click-protection-isolator | isolator | keep | neutralize | remove}

If html-content-action {convert-to-text | modify-content} is modify-content, select how FortiMail will modify the HTML:

  • keep: Keep the URL. Do not remove or modify it.

  • remove: Delete the URL.

  • click-protection: Rewrite the URL to point to FortiMail instead. If the recipient goes to the URL, perform the scans and actions in the global click handling settings ( see system fortiguard url-protection).

  • click-protection-isolator: Similar to click-protection, except that if the URL is not blocked, then FortiMail redirects the recipient to continue browsing indirectly, through FortiIsolator.

  • isolator: Redirect the recipient to continue browsing indirectly, through FortiIsolator (see isolator-url-base <FortiIsolator_url>).

  • neutralize: Modify the URL to make it inactive when clicked, but still easy to determine what the original URL was. For example, a link to:

    https://www.example.com

    is changed to:

    hxxps:\\www[.]example[.]com

This setting applies only if check-html-content is selected in scan-option {block-fragmented-email bypass-on-smtp-auth check-html-content check-max-num-of-attachment check-text-content policy-match}.

click-protection

html-content-url-selection {tag-attribute tag-content}

Select where CDR modifications should apply:

  • tag-attribute: Link URLs in attributes, such as the href attribute in:

    <a href="https://example.com/?tracker=...">

    <a href="file:///\\10.0.0.1\path\doc.rtf!command...">

    (The second URL could be an Office COM moniker exploit via SMB.)

  • tag-content: Link text such as Unsubscribe. Phishers and spammers may use link text to trick recipients into clicking the link, but it actually does something else, such as detecting that the user monitors this mailbox.

    Note: Link tags can contain other HTML tags nested inside, such as:

    <a href="https://example.com">Link text

    <span>Span text</span>

    </a>

    Only link text directly inside the <a> tag is modified. Nested tags' text such as inside <span> will not be modified, unless due to html-hidden-content-action {keep | remove}.

This setting applies only if html-content-action {convert-to-text | modify-content} is modify-content.

tag-attribute

html-hidden-content-action {keep | remove}

Select to either keep or remove text and images that look hidden or transparent to email users, but could be used for prompt injections of AI LLM such as Microsoft Copilot, or for surveillance, tracking, or marketing that uses personally identifiable information (PII) without permission (also called spy pixels, which could be used instead of cookies). Examples include:

  • images with a src URL on a remote server and inline style attributes such as:

    • visibility: hidden;

    • display: none;

    • width: 1px; height: 1px;

  • text and any nested HTML tags with:

    • visibility: hidden;

    • display: none;

    • color: transparent;

    • font-size: 0;

  • comment tags, except for comments by Microsoft Outlook

remove

image-analysis-scan {enable | disable}

Enable to scan images for content that you may want to block. Also configure image-classification-status {enable |disable}, etc.

This setting is available only with a valid feature license, and if status {enable | disable} (global setting) is enabled.

disable

image-classification-profile <image-classification-profile_name>

Select which image analysis profile to use to define which categories to scan for, such as weapons, personal identification, or QR codes. Also configure score-threshold-weapon <score_int> etc.

This setting is available only with a valid feature license, and if image-classification-status {enable |disable} is enabled.

image-classification-status {enable |disable}

Enable to classify images by their subject. Also configure image-classification-profile <image-classification-profile_name>.

This setting is available only with a valid feature license, and if image-analysis-scan {enable | disable} is enabled.

disable

max-num-of-attachment <limit_int>

Enter how many attachments are allowed in one email message. Valid range is from 1 to 100.

This setting applies only if check-max-num-of-attachment is selected in scan-option {block-fragmented-email bypass-on-smtp-auth check-html-content check-max-num-of-attachment check-text-content policy-match}.

10

max-size-option {message | attachment}

Select whether to apply max-size <KB_int> to either the body of the email message or attached files.

message

max-size-status {enable | disable}

Enable to apply max-size <KB_int>.

disable

max-size <KB_int>

Enter the maximum size threshold in kilobytes (KB). Also configure max-size-option {message | attachment}. Then if you want to override action-default <content-action-profile_name> for this scan, also configure action-max-size <content-action-profile_name>.

To disable deferred delivery, enter 0.

This setting applies only if max-size-status {enable | disable} is enable.

10240

office-detect-embedded-option {check-msoffice
check-msoffice-vba
check-msvisio
check-openoffice
check-pdf}

Similar to an archive, documents can sometimes contain scripts, video, graphics, sounds, and other files that are used by the document. By wrapping files within a document instead of linking to the file on a separate, external location, a document becomes more portable. However, it also means that documents with other files nested inside can be used to hide infected files.

Enable to detect other files embedded within the attachment file, and then select which embedded files to scan. Rules from config attachment-scan also apply to embedded files.

Disable to skip scanning of embedded files.

This setting applies only if you select detect-embedded-component in office-scan-option {detect-password-protected detect-embedded-component}.

office-scan-option {detect-password-protected
detect-embedded-component}

Select whether to:

This setting applies only if detect-office-status {enable | disable} is enable.

operator {is | is-not}

Select either:

For example, if you want to reject all attachments that are executable software for Microsoft Windows platforms, you would configure:

Other file types would not match this rule and could trigger a different action in later rules or scans.

is

patterns {<file-type_name> ...}

Select which file types of attachments will be scanned or omitted from the scan, depending on your configuration of operator {is | is-not}.

For multiple file types, separate each entry with a space. To configure more file types, see file filter.

This setting applies only if status {enable | disable} is enable.

scan-archive {enable | disable}

Enable to use the content monitor profile to scan archives such as ZIP files for specified words or phrases.

disable

scan-office {enable | disable}

Enable to use the content monitor profile to scan Microsoft Word and Open Office documents for specified words or phrases.

disable

scan-option {block-fragmented-email
bypass-on-smtp-auth
check-html-content
check-max-num-of-attachment
check-text-content
policy-match}

Select which option(s) to use:

Separate multiple options with a space.

scan-pdf {enable | disable}

Enable to use the content monitor profile to scan Adobe PDF documents for specified words or phrases.

disable

status {enable | disable}

Enable or disable the profile.

disable

status {enable | disable}

Enable or disable the rule.

enable

text-content-action {click-protection | click-protection-isolator | isolator | neutralize | remove-url}

Select how to sanitize the email (options are similar to html-content-url-action {click-protection | click-protection-isolator | isolator | keep | neutralize | remove}).

This setting applies only if check-text-content is selected in scan-option {block-fragmented-email bypass-on-smtp-auth check-html-content check-max-num-of-attachment check-text-content policy-match}.

click-protection

Related topics

antispam image-analysis

file content-disarm-reconstruct

file decryption password

profile content-action

profile image-classification

system fortiguard url-protection

statistics

profile content

profile content

Use this command to create content profiles, which you can use to match email based upon its subject line, message body, and attachments.

Unlike antispam profiles, which deal primarily with spam, content profiles match any other type of email.

Content profiles can be used to apply content-based encryption to email. They can also be used to restrict prohibited content, such as words or phrases, file names, and file attachments that are not permitted by your network usage policy. As such, content profiles can be used both for email that you want to protect, and for email that you want to prevent.

Syntax

config profile content

edit <profile_name>

[set comment "<comment_str>"]

set action-default <content-action-profile_name>

set defersize <KB_int>

config attachment-scan

edit <index_int>

set status {enable | disable}

set operator {is | is-not}

set patterns {<file-type_name> ...}

set action <content-action-profile_name>

next

end

set detect-office-status {enable | disable}

set office-scan-option {detect-password-protected detect-embedded-component}

set detect-password-office-option {detect-only | attempt-to-decrypt }

set office-detect-embedded-option {check-msoffice check-msoffice-vba check-msvisio check-openofficecheck-pdf}

set detect-archive-status {enable | disable}

set archive-scan-option {detect-password-protected block-on-failure-to-decompress block-recursive}

set detect-password-archive-option {detect-only | attempt-to-decrypt }

set archive-max-recursive-level <threshold_int>

set decrypt-password-method {auto-decrypt prompt-user-input}

set decrypt-password-auto-option {built-in-password-list user-defined-password-list words-in-email-content}

set decrypt-password-num-of-words <words_int>

set decrypt-password-quarantine-type {system-quarantine | domain-quarantine}

set decrypt-password-quarantine-folder <folder_name>

set decrypt-password-notification-disclaimer <notification_name>

set scan-option {block-fragmented-email bypass-on-smtp-auth check-html-content check-max-num-of-attachment check-text-content policy-match}

set action-policy-match <content-action-profile_name>

set image-analysis-scan {enable | disable}

set image-classification-status {enable |disable}

set image-classification-profile <image-classification-profile_name>

set action-image-classification <content-action-profile_name>

set max-size-status {enable | disable}

set max-size <KB_int>

set max-size-option {message | attachment}

set action-max-size <content-action-profile_name>

set max-num-of-attachment <limit_int>

set html-content-action {convert-to-text | modify-content}

set html-active-content-action {keep | remove}

set html-hidden-content-action {keep | remove}

set html-content-url-selection {tag-attribute tag-content}

set html-content-url-action {click-protection | click-protection-isolator | isolator | keep | neutralize | remove}

set text-content-action {click-protection | click-protection-isolator | isolator | neutralize | remove-url}

set cdr-file-type-option {office pdf}

set cdr-office-metadata-action {keep | remove}

set action-cdr <content-action-profile_name>

config monitor

edit <index_int>

set status {enable | disable}

set dictionary-type {group | profile}

set dictionary-group <dictionary-group_name>

set dictionary-profile <dictionary-profile_name>

set dict-score <threshold_int>

set action <content-action-profile_name>

set scan-office {enable | disable}

set scan-pdf {enable | disable}

set scan-archive {enable | disable}

next

end

next

end

Variable

Description

Default

<index_int>

Enter the index number of the profile.

If the profile does not currently exist, it will be created.

<profile_name>

Enter the name of the profile.

To view a list of existing entries, enter a question mark ( ? ).

action-cdr <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for CDR features such as html-content-action {convert-to-text | modify-content}, select an action profile. See profile content-action.

action-default <content-action-profile_name>

Select a content action profile. See profile content-action.

This default setting applies only to sub-scans that do not have their own individually configured action, such as action-cdr <content-action-profile_name>.

action-image-classification <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for image classification, select an action profile. See profile content-action.

action-max-size <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for max-size <KB_int>, select an action profile. See profile content-action.

action-policy-match <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for a sender policy match, select an action profile. See profile content-action.

action <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for patterns {<file-type_name> ...}, select an action profile. See profile content-action.

action <content-action-profile_name>

If you want to override action-default <content-action-profile_name> for dict-score <threshold_int>, select an action profile. See profile content-action.

archive-max-recursive-level <threshold_int>

Enter the maximum compression nesting depth. Valid range is 1-36. action-default <content-action-profile_name> will be applied if the file has too many layers of compression.

This setting applies only if block-recursive is selected in archive-scan-option {detect-password-protected block-on-failure-to-decompress block-recursive}.

12

archive-scan-option {detect-password-protected
block-on-failure-to-decompress
block-recursive}

Select whether to:

This setting applies only if detect-archive-status {enable | disable} is enable.

cdr-file-type-option {office pdf}

Select which file type(s) to apply content disarming and reconstruction (CDR) to:

  • office: Microsoft Office attachments, including embedded files inside of them(nested compression is not supported).
  • pdf: PDF attachments, including documents inside of archives (nested compression is not supported).

See also file content-disarm-reconstruct.

cdr-office-metadata-action {keep | remove}

Select whether to keep or remove potentially sensitive document property metadata. Also configure metadata-type-option {...}.

Currently DOCX, PPTX, and XLSX files are supported.

remove

comment "<comment_str>"

Enter a description or comment.

decrypt-password-auto-option {built-in-password-list
user-defined-password-list
words-in-email-content}

Select which kinds of password to try to automatically decrypt files:

  • built-in-password-list: Predefined list of common passwords as passwords for the attachment file. Predefined passwords are built-in and may be updated when the FortiMail software is updated

  • user-defined-password-list: Passwords that administrators configure for attachment files. To configure the passwords, see file decryption password.

  • words-in-email-content: Search for the word "password" in the email and try words around it as passwords for the attachment file. The password may be separated by a space character or:

    -,.:

    If the word "password" does not exist, then FortiMail tries words in the email body.

    Multiple languages are supported for the word "password". "Password" translations are built-in and may be updated when the FortiMail software is updated.

    For example, if the email has a sentence such as:

    To open the document, please use password: 123456. If you cannot open it, please contact us.”

    and if decrypt-password-num-of-words <words_int> is 2, then FortiMail tries these words in sequential order:

    1. please

    2. use

    3. 123456

    4. If

This setting applies only if auto-decrypt is selected in decrypt-password-method {auto-decrypt prompt-user-input}.

words-in-email-content

decrypt-password-method {auto-decrypt prompt-user-input}

Select which methods to try if an attachment file is password-protected:

This setting applies only if attempt-to-decrypt is selected in either or both:

auto-decrypt

decrypt-password-notification-disclaimer <notification_name>

Select which notification template to use for the file password prompt.

This setting applies only if decrypt-password-method {auto-decrypt prompt-user-input} is prompt-user-input.

default

decrypt-password-num-of-words <words_int>

Enter how many nearby words to try as the attachment file's password.

This setting applies only if you select words-in-email-content in decrypt-password-auto-option {built-in-password-list user-defined-password-list words-in-email-content}.

5

decrypt-password-quarantine-folder <folder_name>

Select which folder will be used to temporarily store email until the sender responds to the password prompt. To configure a quarantine folder, see <folder_name>.

This setting applies only if decrypt-password-method {auto-decrypt prompt-user-input} is prompt-user-input.

Content_PasswordProtected

decrypt-password-quarantine-type {system-quarantine | domain-quarantine}

Select whether to use the system-level or domain-level quarantine to temporarily store email while FortiMail waits for the sender to respond to the file password prompt.

This setting applies only if decrypt-password-method {auto-decrypt prompt-user-input} is prompt-user-input.

system-quarantine

defersize <KB_int>

Enter the attachment size threshold in kilobytes for deferred delivery. See also defer-delivery-starttime <time_str> and defer-delivery {enable | disable}.

To disable the limit, enter 0.

Alternatively, configure max-size <KB_int>.

0

detect-archive-status {enable | disable}

Enable to scan archives such as ZIP files according to archive-scan-option {detect-password-protected block-on-failure-to-decompress block-recursive}.

Disable to skip those scans.

Note: This setting does not enable or disable other archive settings in the content profile such as the content monitor setting scan-archive {enable | disable}.

disable

detect-office-status {enable | disable}

Enable to scan Microsoft Office, Open Office, and Adobe PDF files according to office-scan-option {detect-password-protected detect-embedded-component}.

Disable to skip those scans.

Note: This setting does not enable or disable other Office or PDF settings in the content profile, such as the CDR setting cdr-file-type-option {office pdf} and the content monitor settingsscan-office {enable | disable} and scan-pdf {enable | disable}.

disable

detect-password-archive-option {detect-only | attempt-to-decrypt }

Select either:

This setting applies only if detect-archive-status {enable | disable} is enable.

detect-only

detect-password-office-option {detect-only | attempt-to-decrypt }

Select either:

This setting applies only if detect-office-status {enable | disable} is enable.

detect-only

dict-score <threshold_int>

Enter the number of times that an email must match the dictionary profile before it will receive the action configured in action <content-action-profile_name>.

Note: The score is based on matches in each individual dictionary profile, not the total in dictionary-group <dictionary-group_name>.

1

dictionary-group <dictionary-group_name>

Select which dictionary profile group the content monitor profile will use to find matching text. See profile dictionary-group.

See also information on dictionary profiles.

dictionary-profile <dictionary-profile_name>

Select which dictionary profile the content monitor profile will use to find matching text.

See also information on dictionary profiles.

dictionary-type {group | profile}

Select which will be used to find matching text, either:

Also configure dict-score <threshold_int>.

group

html-active-content-action {keep | remove}

Select to either keep or remove scripts such as JavaScript.

This setting applies only if html-content-action {convert-to-text | modify-content} is modify-content.

remove

html-content-action {convert-to-text | modify-content}

Select either:

This setting applies only if check-html-content is selected in scan-option {block-fragmented-email bypass-on-smtp-auth check-html-content check-max-num-of-attachment check-text-content policy-match}.

modify-content

html-content-url-action {click-protection | click-protection-isolator | isolator | keep | neutralize | remove}

If html-content-action {convert-to-text | modify-content} is modify-content, select how FortiMail will modify the HTML:

  • keep: Keep the URL. Do not remove or modify it.

  • remove: Delete the URL.

  • click-protection: Rewrite the URL to point to FortiMail instead. If the recipient goes to the URL, perform the scans and actions in the global click handling settings ( see system fortiguard url-protection).

  • click-protection-isolator: Similar to click-protection, except that if the URL is not blocked, then FortiMail redirects the recipient to continue browsing indirectly, through FortiIsolator.

  • isolator: Redirect the recipient to continue browsing indirectly, through FortiIsolator (see isolator-url-base <FortiIsolator_url>).

  • neutralize: Modify the URL to make it inactive when clicked, but still easy to determine what the original URL was. For example, a link to:

    https://www.example.com

    is changed to:

    hxxps:\\www[.]example[.]com

This setting applies only if check-html-content is selected in scan-option {block-fragmented-email bypass-on-smtp-auth check-html-content check-max-num-of-attachment check-text-content policy-match}.

click-protection

html-content-url-selection {tag-attribute tag-content}

Select where CDR modifications should apply:

  • tag-attribute: Link URLs in attributes, such as the href attribute in:

    <a href="https://example.com/?tracker=...">

    <a href="file:///\\10.0.0.1\path\doc.rtf!command...">

    (The second URL could be an Office COM moniker exploit via SMB.)

  • tag-content: Link text such as Unsubscribe. Phishers and spammers may use link text to trick recipients into clicking the link, but it actually does something else, such as detecting that the user monitors this mailbox.

    Note: Link tags can contain other HTML tags nested inside, such as:

    <a href="https://example.com">Link text

    <span>Span text</span>

    </a>

    Only link text directly inside the <a> tag is modified. Nested tags' text such as inside <span> will not be modified, unless due to html-hidden-content-action {keep | remove}.

This setting applies only if html-content-action {convert-to-text | modify-content} is modify-content.

tag-attribute

html-hidden-content-action {keep | remove}

Select to either keep or remove text and images that look hidden or transparent to email users, but could be used for prompt injections of AI LLM such as Microsoft Copilot, or for surveillance, tracking, or marketing that uses personally identifiable information (PII) without permission (also called spy pixels, which could be used instead of cookies). Examples include:

  • images with a src URL on a remote server and inline style attributes such as:

    • visibility: hidden;

    • display: none;

    • width: 1px; height: 1px;

  • text and any nested HTML tags with:

    • visibility: hidden;

    • display: none;

    • color: transparent;

    • font-size: 0;

  • comment tags, except for comments by Microsoft Outlook

remove

image-analysis-scan {enable | disable}

Enable to scan images for content that you may want to block. Also configure image-classification-status {enable |disable}, etc.

This setting is available only with a valid feature license, and if status {enable | disable} (global setting) is enabled.

disable

image-classification-profile <image-classification-profile_name>

Select which image analysis profile to use to define which categories to scan for, such as weapons, personal identification, or QR codes. Also configure score-threshold-weapon <score_int> etc.

This setting is available only with a valid feature license, and if image-classification-status {enable |disable} is enabled.

image-classification-status {enable |disable}

Enable to classify images by their subject. Also configure image-classification-profile <image-classification-profile_name>.

This setting is available only with a valid feature license, and if image-analysis-scan {enable | disable} is enabled.

disable

max-num-of-attachment <limit_int>

Enter how many attachments are allowed in one email message. Valid range is from 1 to 100.

This setting applies only if check-max-num-of-attachment is selected in scan-option {block-fragmented-email bypass-on-smtp-auth check-html-content check-max-num-of-attachment check-text-content policy-match}.

10

max-size-option {message | attachment}

Select whether to apply max-size <KB_int> to either the body of the email message or attached files.

message

max-size-status {enable | disable}

Enable to apply max-size <KB_int>.

disable

max-size <KB_int>

Enter the maximum size threshold in kilobytes (KB). Also configure max-size-option {message | attachment}. Then if you want to override action-default <content-action-profile_name> for this scan, also configure action-max-size <content-action-profile_name>.

To disable deferred delivery, enter 0.

This setting applies only if max-size-status {enable | disable} is enable.

10240

office-detect-embedded-option {check-msoffice
check-msoffice-vba
check-msvisio
check-openoffice
check-pdf}

Similar to an archive, documents can sometimes contain scripts, video, graphics, sounds, and other files that are used by the document. By wrapping files within a document instead of linking to the file on a separate, external location, a document becomes more portable. However, it also means that documents with other files nested inside can be used to hide infected files.

Enable to detect other files embedded within the attachment file, and then select which embedded files to scan. Rules from config attachment-scan also apply to embedded files.

Disable to skip scanning of embedded files.

This setting applies only if you select detect-embedded-component in office-scan-option {detect-password-protected detect-embedded-component}.

office-scan-option {detect-password-protected
detect-embedded-component}

Select whether to:

This setting applies only if detect-office-status {enable | disable} is enable.

operator {is | is-not}

Select either:

For example, if you want to reject all attachments that are executable software for Microsoft Windows platforms, you would configure:

Other file types would not match this rule and could trigger a different action in later rules or scans.

is

patterns {<file-type_name> ...}

Select which file types of attachments will be scanned or omitted from the scan, depending on your configuration of operator {is | is-not}.

For multiple file types, separate each entry with a space. To configure more file types, see file filter.

This setting applies only if status {enable | disable} is enable.

scan-archive {enable | disable}

Enable to use the content monitor profile to scan archives such as ZIP files for specified words or phrases.

disable

scan-office {enable | disable}

Enable to use the content monitor profile to scan Microsoft Word and Open Office documents for specified words or phrases.

disable

scan-option {block-fragmented-email
bypass-on-smtp-auth
check-html-content
check-max-num-of-attachment
check-text-content
policy-match}

Select which option(s) to use:

Separate multiple options with a space.

scan-pdf {enable | disable}

Enable to use the content monitor profile to scan Adobe PDF documents for specified words or phrases.

disable

status {enable | disable}

Enable or disable the profile.

disable

status {enable | disable}

Enable or disable the rule.

enable

text-content-action {click-protection | click-protection-isolator | isolator | neutralize | remove-url}

Select how to sanitize the email (options are similar to html-content-url-action {click-protection | click-protection-isolator | isolator | keep | neutralize | remove}).

This setting applies only if check-text-content is selected in scan-option {block-fragmented-email bypass-on-smtp-auth check-html-content check-max-num-of-attachment check-text-content policy-match}.

click-protection

Related topics

antispam image-analysis

file content-disarm-reconstruct

file decryption password

profile content-action

profile image-classification

system fortiguard url-protection

statistics