community.fortios.fmgr_secprof_spam module – spam filter profile for FMG
Note
This module is part of the community.fortios collection (version 1.0.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.fortios
.
To use it in a playbook, specify: community.fortios.fmgr_secprof_spam
.
Synopsis
Manage spam filter security profiles within FortiManager via API
Parameters
Parameter |
Comments |
---|---|
The ADOM the configuration should belong to. Default: |
|
Comment. |
|
Enable/disable external Email inspection. Choices:
|
|
Enable/disable flow-based spam filtering. Choices:
|
|
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 |
|
Enable/disable logging. Choices:
|
|
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 |
|
Action for spam email. Choices:
|
|
Enable/disable logging. Choices:
|
|
Subject text or header added to spam email. |
|
Tag subject or header for spam email. FLAG Based Options. Specify multiple in list form. Choices:
|
|
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 |
|
Action for spam email. Choices:
|
|
Enable/disable logging. Choices:
|
|
Sets one of three modes for managing the object. Allows use of soft-adds instead of overwriting existing values Choices:
|
|
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 |
|
Enable/disable logging. Choices:
|
|
Profile name. |
|
None FLAG Based Options. Specify multiple in list form. Choices:
|
|
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 |
|
Action for spam email. Choices:
|
|
Enable/disable logging. Choices:
|
|
Subject text or header added to spam email. |
|
Tag subject or header for spam email. FLAG Based Options. Specify multiple in list form. Choices:
|
|
Replacement message group. |
|
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 |
|
Action for spam email. Choices:
|
|
Enable/disable SMTP email header IP checks for spamfsip, spamrbl and spambwl filters. Choices:
|
|
Enable/disable local filter to override SMTP remote check result. Choices:
|
|
Enable/disable logging. Choices:
|
|
Subject text or header added to spam email. |
|
Tag subject or header for spam email. FLAG Based Options. Specify multiple in list form. Choices:
|
|
Anti-spam black/white list table ID. |
|
Anti-spam banned word table ID. |
|
Spam banned word threshold. |
|
Enable/disable spam filtering. Choices:
|
|
Anti-spam IP trust table ID. |
|
Enable/disable spam logging for email filtering. Choices:
|
|
Enable/disable logging FortiGuard spam response. Choices:
|
|
Anti-spam MIME header table ID. |
|
Anti-spam DNSBL table ID. |
|
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 |
|
Enable/disable logging. Choices:
|
Notes
Note
Full Documentation at https://ftnt-ansible-docs.readthedocs.io/en/latest/.
Examples
- name: DELETE Profile
community.fortios.fmgr_secprof_spam:
name: "Ansible_Spam_Filter_Profile"
mode: "delete"
- name: Create FMGR_SPAMFILTER_PROFILE
community.fortios.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 |
Description |
---|---|
full API response, includes status code and message Returned: always |