fmgr_secprof_spam – spam filter profile for FMG

New in version 2.8.

Synopsis

  • Manage spam filter security profiles within FortiManager via API

Parameters

Parameter Choices/Defaults Comments
adom
-
Default:
"root"
The ADOM the configuration should belong to.
comment
-
Comment.
external
-
    Choices:
  • disable
  • enable
Enable/disable external Email inspection.
flow_based
-
    Choices:
  • disable
  • enable
Enable/disable flow-based spam filtering.
gmail
-
EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED!
List of multiple child objects to be added. Expects a list of dictionaries.
Dictionaries must use FortiManager API parameters, not the ansible ones listed below.
If submitted, all other prefixed sub-parameters ARE IGNORED.
This object is MUTUALLY EXCLUSIVE with its options.
We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide.
WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS
gmail_log
-
    Choices:
  • disable
  • enable
Enable/disable logging.
imap
-
EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED!
List of multiple child objects to be added. Expects a list of dictionaries.
Dictionaries must use FortiManager API parameters, not the ansible ones listed below.
If submitted, all other prefixed sub-parameters ARE IGNORED.
This object is MUTUALLY EXCLUSIVE with its options.
We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide.
WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS
imap_action
-
    Choices:
  • pass
  • tag
Action for spam email.
imap_log
-
    Choices:
  • disable
  • enable
Enable/disable logging.
imap_tag_msg
-
Subject text or header added to spam email.
imap_tag_type
-
    Choices:
  • subject
  • header
  • spaminfo
Tag subject or header for spam email.
FLAG Based Options. Specify multiple in list form.
mapi
-
EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED!
List of multiple child objects to be added. Expects a list of dictionaries.
Dictionaries must use FortiManager API parameters, not the ansible ones listed below.
If submitted, all other prefixed sub-parameters ARE IGNORED.
This object is MUTUALLY EXCLUSIVE with its options.
We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide.
WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS
mapi_action
-
    Choices:
  • pass
  • discard
Action for spam email.
mapi_log
-
    Choices:
  • disable
  • enable
Enable/disable logging.
mode
-
    Choices:
  • add ←
  • set
  • delete
  • update
Sets one of three modes for managing the object.
Allows use of soft-adds instead of overwriting existing values
msn_hotmail
-
EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED!
List of multiple child objects to be added. Expects a list of dictionaries.
Dictionaries must use FortiManager API parameters, not the ansible ones listed below.
If submitted, all other prefixed sub-parameters ARE IGNORED.
This object is MUTUALLY EXCLUSIVE with its options.
We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide.
WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS
msn_hotmail_log
-
    Choices:
  • disable
  • enable
Enable/disable logging.
name
-
Profile name.
options
-
    Choices:
  • bannedword
  • spamfsip
  • spamfssubmit
  • spamfschksum
  • spamfsurl
  • spamhelodns
  • spamraddrdns
  • spamrbl
  • spamhdrcheck
  • spamfsphish
  • spambwl
None
FLAG Based Options. Specify multiple in list form.
pop3
-
EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED!
List of multiple child objects to be added. Expects a list of dictionaries.
Dictionaries must use FortiManager API parameters, not the ansible ones listed below.
If submitted, all other prefixed sub-parameters ARE IGNORED.
This object is MUTUALLY EXCLUSIVE with its options.
We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide.
WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS
pop3_action
-
    Choices:
  • pass
  • tag
Action for spam email.
pop3_log
-
    Choices:
  • disable
  • enable
Enable/disable logging.
pop3_tag_msg
-
Subject text or header added to spam email.
pop3_tag_type
-
    Choices:
  • subject
  • header
  • spaminfo
Tag subject or header for spam email.
FLAG Based Options. Specify multiple in list form.
replacemsg_group
-
Replacement message group.
smtp
-
EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED!
List of multiple child objects to be added. Expects a list of dictionaries.
Dictionaries must use FortiManager API parameters, not the ansible ones listed below.
If submitted, all other prefixed sub-parameters ARE IGNORED.
This object is MUTUALLY EXCLUSIVE with its options.
We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide.
WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS
smtp_action
-
    Choices:
  • pass
  • tag
  • discard
Action for spam email.
smtp_hdrip
-
    Choices:
  • disable
  • enable
Enable/disable SMTP email header IP checks for spamfsip, spamrbl and spambwl filters.
smtp_local_override
-
    Choices:
  • disable
  • enable
Enable/disable local filter to override SMTP remote check result.
smtp_log
-
    Choices:
  • disable
  • enable
Enable/disable logging.
smtp_tag_msg
-
Subject text or header added to spam email.
smtp_tag_type
-
    Choices:
  • subject
  • header
  • spaminfo
Tag subject or header for spam email.
FLAG Based Options. Specify multiple in list form.
spam_bwl_table
-
Anti-spam black/white list table ID.
spam_bword_table
-
Anti-spam banned word table ID.
spam_bword_threshold
-
Spam banned word threshold.
spam_filtering
-
    Choices:
  • disable
  • enable
Enable/disable spam filtering.
spam_iptrust_table
-
Anti-spam IP trust table ID.
spam_log
-
    Choices:
  • disable
  • enable
Enable/disable spam logging for email filtering.
spam_log_fortiguard_response
-
    Choices:
  • disable
  • enable
Enable/disable logging FortiGuard spam response.
spam_mheader_table
-
Anti-spam MIME header table ID.
spam_rbl_table
-
Anti-spam DNSBL table ID.
yahoo_mail
-
EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED!
List of multiple child objects to be added. Expects a list of dictionaries.
Dictionaries must use FortiManager API parameters, not the ansible ones listed below.
If submitted, all other prefixed sub-parameters ARE IGNORED.
This object is MUTUALLY EXCLUSIVE with its options.
We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide.
WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS
yahoo_mail_log
-
    Choices:
  • disable
  • enable
Enable/disable logging.

Examples

- name: DELETE Profile
  fmgr_secprof_spam:
    name: "Ansible_Spam_Filter_Profile"
    mode: "delete"

- name: Create FMGR_SPAMFILTER_PROFILE
  fmgr_secprof_spam:
    host: "{{ inventory_hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    mode: "set"
    adom: "root"
    spam_log_fortiguard_response: "enable"
    spam_iptrust_table:
    spam_filtering: "enable"
    spam_bword_threshold: 10
    options: ["bannedword", "spamfsip", "spamfsurl", "spamrbl", "spamfsphish", "spambwl"]
    name: "Ansible_Spam_Filter_Profile"
    flow_based: "enable"
    external: "enable"
    comment: "Created by Ansible"
    gmail_log: "enable"
    spam_log: "enable"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
api_result
string
always
full API response, includes status code and message



Status

Authors

  • Luke Weighall (@lweighall)
  • Andrew Welsh (@Ghilli3)
  • Jim Huber (@p4r4n0y1ng)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.