Fortinet Document Library

Version:


Table of Contents

CLI Reference

6.2.1
Copy Link

Configure Email Filter profiles.

  config emailfilter profile
      Description: Configure Email Filter profiles.
      edit <name>
          set comment {var-string}
          set replacemsg-group {string}
          set spam-log [disable|enable]
          set spam-log-fortiguard-response [disable|enable]
          config file-filter
              Description: File filter.
              set status [enable|disable]
              set log [enable|disable]
              set scan-archive-contents [enable|disable]
              config entries
                  Description: File filter entries.
                  edit <filter>
                      set comment {var-string}
                      set protocol {option1}, {option2}, ...
                      set action [log|block]
                      set password-protected [yes|any]
                      set file-type <name1>, <name2>, ...
                  next
              end
          end
          set spam-filtering [enable|disable]
          set external [enable|disable]
          set options {option1}, {option2}, ...
          config imap
              Description: IMAP.
              set log [enable|disable]
              set action [pass|tag]
              set tag-type {option1}, {option2}, ...
              set tag-msg {string}
          end
          config pop3
              Description: POP3.
              set log [enable|disable]
              set action [pass|tag]
              set tag-type {option1}, {option2}, ...
              set tag-msg {string}
          end
          config smtp
              Description: SMTP.
              set log [enable|disable]
              set action [pass|tag|...]
              set tag-type {option1}, {option2}, ...
              set tag-msg {string}
              set hdrip [disable|enable]
              set local-override [disable|enable]
          end
          config mapi
              Description: MAPI.
              set log [enable|disable]
              set action [pass|discard]
          end
          config msn-hotmail
              Description: MSN Hotmail.
              set log [enable|disable]
          end
          config yahoo-mail
              Description: Yahoo! Mail.
              set log [enable|disable]
          end
          config gmail
              Description: Gmail.
              set log [enable|disable]
          end
          set spam-bword-threshold {integer}
          set spam-bword-table {integer}
          set spam-bwl-table {integer}
          set spam-mheader-table {integer}
          set spam-rbl-table {integer}
          set spam-iptrust-table {integer}
      next
  end

config emailfilter profile

Parameter Name Description Type Size
comment Comment. var-string Maximum length: 255
replacemsg-group Replacement message group. string Maximum length: 35
spam-log Enable/disable spam logging for email filtering.
disable: Disable spam logging for email filtering.
enable: Enable spam logging for email filtering.
option -
spam-log-fortiguard-response Enable/disable logging FortiGuard spam response.
disable: Disable logging FortiGuard spam response.
enable: Enable logging FortiGuard spam response.
option -
spam-filtering Enable/disable spam filtering.
enable: Enable setting.
disable: Disable setting.
option -
external Enable/disable external Email inspection.
enable: Enable setting.
disable: Disable setting.
option -
options Options.
bannedword: Content block.
spambwl: Black/white list.
spamfsip: Email IP address FortiGuard AntiSpam black list check.
spamfssubmit: Add FortiGuard AntiSpam spam submission text.
spamfschksum: Email checksum FortiGuard AntiSpam check.
spamfsurl: Email content URL FortiGuard AntiSpam check.
spamhelodns: Email helo/ehlo domain DNS check.
spamraddrdns: Email return address DNS check.
spamrbl: Email DNSBL & ORBL check.
spamhdrcheck: Email mime header check.
spamfsphish: Email content phishing URL FortiGuard AntiSpam check.
option -
spam-bword-threshold Spam banned word threshold. integer Minimum value: 0 Maximum value: 2147483647
spam-bword-table Anti-spam banned word table ID. integer Minimum value: 0 Maximum value: 4294967295
spam-bwl-table Anti-spam black/white list table ID. integer Minimum value: 0 Maximum value: 4294967295
spam-mheader-table Anti-spam MIME header table ID. integer Minimum value: 0 Maximum value: 4294967295
spam-rbl-table Anti-spam DNSBL table ID. integer Minimum value: 0 Maximum value: 4294967295
spam-iptrust-table Anti-spam IP trust table ID. integer Minimum value: 0 Maximum value: 4294967295

config file-filter

Parameter Name Description Type Size
status Enable/disable file filter.
enable: Enable file filter.
disable: Disable file filter.
option -
log Enable/disable file filter logging.
enable: Enable file filter logging.
disable: Disable file filter logging.
option -
scan-archive-contents Enable/disable file filter archive contents scan.
enable: Enable file filter archive contents scan.
disable: Disable file filter archive contents scan.
option -

config entries

Parameter Name Description Type Size
comment Comment. var-string Maximum length: 255
protocol Protocols to apply with.
smtp: Enable/disable SMTP.
imap: Enable/disable IMAP.
pop3: Enable/disable POP3.
option -
action Action taken for matched file.
log: Allow the content and write a log message.
block: Block the content and write a log message.
option -
password-protected Match password-protected files.
yes: Match only password-protected files.
any: Match any file.
option -
file-type <name> Select file type.
File type name.
string Maximum length: 39

config imap

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -
action Action for spam email.
pass: Allow spam email to pass through.
tag: Tag spam email with configured text in subject or header.
option -
tag-type Tag subject or header for spam email.
subject: Prepend text to spam email subject.
header: Append a user defined mime header to spam email.
spaminfo: Append spam info to spam email header.
option -
tag-msg Subject text or header added to spam email. string Maximum length: 63

config pop3

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -
action Action for spam email.
pass: Allow spam email to pass through.
tag: Tag spam email with configured text in subject or header.
option -
tag-type Tag subject or header for spam email.
subject: Prepend text to spam email subject.
header: Append a user defined mime header to spam email.
spaminfo: Append spam info to spam email header.
option -
tag-msg Subject text or header added to spam email. string Maximum length: 63

config smtp

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -
action Action for spam email.
pass: Allow spam email to pass through.
tag: Tag spam email with configured text in subject or header.
discard: Discard (block) spam email.
option -
tag-type Tag subject or header for spam email.
subject: Prepend text to spam email subject.
header: Append a user defined mime header to spam email.
spaminfo: Append spam info to spam email header.
option -
tag-msg Subject text or header added to spam email. string Maximum length: 63
hdrip Enable/disable SMTP email header IP checks for spamfsip, spamrbl and spambwl filters.
disable: Disable SMTP email header IP checks for spamfsip, spamrbl and spambwl filters.
enable: Enable SMTP email header IP checks for spamfsip, spamrbl and spambwl filters.
option -
local-override Enable/disable local filter to override SMTP remote check result.
disable: Disable local filter to override SMTP remote check result.
enable: Enable local filter to override SMTP remote check result.
option -

config mapi

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -
action Action for spam email.
pass: Allow spam email to pass through.
discard: Discard (block) spam email.
option -

config msn-hotmail

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -

config yahoo-mail

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -

config gmail

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -

Configure Email Filter profiles.

  config emailfilter profile
      Description: Configure Email Filter profiles.
      edit <name>
          set comment {var-string}
          set replacemsg-group {string}
          set spam-log [disable|enable]
          set spam-log-fortiguard-response [disable|enable]
          config file-filter
              Description: File filter.
              set status [enable|disable]
              set log [enable|disable]
              set scan-archive-contents [enable|disable]
              config entries
                  Description: File filter entries.
                  edit <filter>
                      set comment {var-string}
                      set protocol {option1}, {option2}, ...
                      set action [log|block]
                      set password-protected [yes|any]
                      set file-type <name1>, <name2>, ...
                  next
              end
          end
          set spam-filtering [enable|disable]
          set external [enable|disable]
          set options {option1}, {option2}, ...
          config imap
              Description: IMAP.
              set log [enable|disable]
              set action [pass|tag]
              set tag-type {option1}, {option2}, ...
              set tag-msg {string}
          end
          config pop3
              Description: POP3.
              set log [enable|disable]
              set action [pass|tag]
              set tag-type {option1}, {option2}, ...
              set tag-msg {string}
          end
          config smtp
              Description: SMTP.
              set log [enable|disable]
              set action [pass|tag|...]
              set tag-type {option1}, {option2}, ...
              set tag-msg {string}
              set hdrip [disable|enable]
              set local-override [disable|enable]
          end
          config mapi
              Description: MAPI.
              set log [enable|disable]
              set action [pass|discard]
          end
          config msn-hotmail
              Description: MSN Hotmail.
              set log [enable|disable]
          end
          config yahoo-mail
              Description: Yahoo! Mail.
              set log [enable|disable]
          end
          config gmail
              Description: Gmail.
              set log [enable|disable]
          end
          set spam-bword-threshold {integer}
          set spam-bword-table {integer}
          set spam-bwl-table {integer}
          set spam-mheader-table {integer}
          set spam-rbl-table {integer}
          set spam-iptrust-table {integer}
      next
  end

config emailfilter profile

Parameter Name Description Type Size
comment Comment. var-string Maximum length: 255
replacemsg-group Replacement message group. string Maximum length: 35
spam-log Enable/disable spam logging for email filtering.
disable: Disable spam logging for email filtering.
enable: Enable spam logging for email filtering.
option -
spam-log-fortiguard-response Enable/disable logging FortiGuard spam response.
disable: Disable logging FortiGuard spam response.
enable: Enable logging FortiGuard spam response.
option -
spam-filtering Enable/disable spam filtering.
enable: Enable setting.
disable: Disable setting.
option -
external Enable/disable external Email inspection.
enable: Enable setting.
disable: Disable setting.
option -
options Options.
bannedword: Content block.
spambwl: Black/white list.
spamfsip: Email IP address FortiGuard AntiSpam black list check.
spamfssubmit: Add FortiGuard AntiSpam spam submission text.
spamfschksum: Email checksum FortiGuard AntiSpam check.
spamfsurl: Email content URL FortiGuard AntiSpam check.
spamhelodns: Email helo/ehlo domain DNS check.
spamraddrdns: Email return address DNS check.
spamrbl: Email DNSBL & ORBL check.
spamhdrcheck: Email mime header check.
spamfsphish: Email content phishing URL FortiGuard AntiSpam check.
option -
spam-bword-threshold Spam banned word threshold. integer Minimum value: 0 Maximum value: 2147483647
spam-bword-table Anti-spam banned word table ID. integer Minimum value: 0 Maximum value: 4294967295
spam-bwl-table Anti-spam black/white list table ID. integer Minimum value: 0 Maximum value: 4294967295
spam-mheader-table Anti-spam MIME header table ID. integer Minimum value: 0 Maximum value: 4294967295
spam-rbl-table Anti-spam DNSBL table ID. integer Minimum value: 0 Maximum value: 4294967295
spam-iptrust-table Anti-spam IP trust table ID. integer Minimum value: 0 Maximum value: 4294967295

config file-filter

Parameter Name Description Type Size
status Enable/disable file filter.
enable: Enable file filter.
disable: Disable file filter.
option -
log Enable/disable file filter logging.
enable: Enable file filter logging.
disable: Disable file filter logging.
option -
scan-archive-contents Enable/disable file filter archive contents scan.
enable: Enable file filter archive contents scan.
disable: Disable file filter archive contents scan.
option -

config entries

Parameter Name Description Type Size
comment Comment. var-string Maximum length: 255
protocol Protocols to apply with.
smtp: Enable/disable SMTP.
imap: Enable/disable IMAP.
pop3: Enable/disable POP3.
option -
action Action taken for matched file.
log: Allow the content and write a log message.
block: Block the content and write a log message.
option -
password-protected Match password-protected files.
yes: Match only password-protected files.
any: Match any file.
option -
file-type <name> Select file type.
File type name.
string Maximum length: 39

config imap

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -
action Action for spam email.
pass: Allow spam email to pass through.
tag: Tag spam email with configured text in subject or header.
option -
tag-type Tag subject or header for spam email.
subject: Prepend text to spam email subject.
header: Append a user defined mime header to spam email.
spaminfo: Append spam info to spam email header.
option -
tag-msg Subject text or header added to spam email. string Maximum length: 63

config pop3

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -
action Action for spam email.
pass: Allow spam email to pass through.
tag: Tag spam email with configured text in subject or header.
option -
tag-type Tag subject or header for spam email.
subject: Prepend text to spam email subject.
header: Append a user defined mime header to spam email.
spaminfo: Append spam info to spam email header.
option -
tag-msg Subject text or header added to spam email. string Maximum length: 63

config smtp

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -
action Action for spam email.
pass: Allow spam email to pass through.
tag: Tag spam email with configured text in subject or header.
discard: Discard (block) spam email.
option -
tag-type Tag subject or header for spam email.
subject: Prepend text to spam email subject.
header: Append a user defined mime header to spam email.
spaminfo: Append spam info to spam email header.
option -
tag-msg Subject text or header added to spam email. string Maximum length: 63
hdrip Enable/disable SMTP email header IP checks for spamfsip, spamrbl and spambwl filters.
disable: Disable SMTP email header IP checks for spamfsip, spamrbl and spambwl filters.
enable: Enable SMTP email header IP checks for spamfsip, spamrbl and spambwl filters.
option -
local-override Enable/disable local filter to override SMTP remote check result.
disable: Disable local filter to override SMTP remote check result.
enable: Enable local filter to override SMTP remote check result.
option -

config mapi

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -
action Action for spam email.
pass: Allow spam email to pass through.
discard: Discard (block) spam email.
option -

config msn-hotmail

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -

config yahoo-mail

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -

config gmail

Parameter Name Description Type Size
log Enable/disable logging.
enable: Enable setting.
disable: Disable setting.
option -