New in version 2.8.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments | ||
---|---|---|---|---|
host
-
/ required
|
FortiOS or FortiGate ip address.
|
|||
https
boolean
|
|
Indicates if the requests towards FortiGate must use HTTPS protocol
|
||
password
-
|
Default: ""
|
FortiOS or FortiGate password.
|
||
spamfilter_profile
-
|
Default: null
|
Configure AntiSpam profiles.
|
||
comment
-
|
Comment.
|
|||
external
-
|
|
Enable/disable external Email inspection.
|
||
flow-based
-
|
|
Enable/disable flow-based spam filtering.
|
||
gmail
-
|
Gmail.
|
|||
log
-
|
|
Enable/disable logging.
|
||
imap
-
|
IMAP.
|
|||
action
-
|
|
Action for spam email.
|
||
log
-
|
|
Enable/disable logging.
|
||
tag-msg
-
|
Subject text or header added to spam email.
|
|||
tag-type
-
|
|
Tag subject or header for spam email.
|
||
mapi
-
|
MAPI.
|
|||
action
-
|
|
Action for spam email.
|
||
log
-
|
|
Enable/disable logging.
|
||
msn-hotmail
-
|
MSN Hotmail.
|
|||
log
-
|
|
Enable/disable logging.
|
||
name
-
/ required
|
Profile name.
|
|||
options
-
|
|
Options.
|
||
pop3
-
|
POP3.
|
|||
action
-
|
|
Action for spam email.
|
||
log
-
|
|
Enable/disable logging.
|
||
tag-msg
-
|
Subject text or header added to spam email.
|
|||
tag-type
-
|
|
Tag subject or header for spam email.
|
||
replacemsg-group
-
|
Replacement message group. Source system.replacemsg-group.name.
|
|||
smtp
-
|
SMTP.
|
|||
action
-
|
|
Action for spam email.
|
||
hdrip
-
|
|
Enable/disable SMTP email header IP checks for spamfsip, spamrbl and spambwl filters.
|
||
local-override
-
|
|
Enable/disable local filter to override SMTP remote check result.
|
||
log
-
|
|
Enable/disable logging.
|
||
tag-msg
-
|
Subject text or header added to spam email.
|
|||
tag-type
-
|
|
Tag subject or header for spam email.
|
||
spam-bwl-table
-
|
Anti-spam black/white list table ID. Source spamfilter.bwl.id.
|
|||
spam-bword-table
-
|
Anti-spam banned word table ID. Source spamfilter.bword.id.
|
|||
spam-bword-threshold
-
|
Spam banned word threshold.
|
|||
spam-filtering
-
|
|
Enable/disable spam filtering.
|
||
spam-iptrust-table
-
|
Anti-spam IP trust table ID. Source spamfilter.iptrust.id.
|
|||
spam-log
-
|
|
Enable/disable spam logging for email filtering.
|
||
spam-log-fortiguard-response
-
|
|
Enable/disable logging FortiGuard spam response.
|
||
spam-mheader-table
-
|
Anti-spam MIME header table ID. Source spamfilter.mheader.id.
|
|||
spam-rbl-table
-
|
Anti-spam DNSBL table ID. Source spamfilter.dnsbl.id.
|
|||
state
-
|
|
Indicates whether to create or remove the object
|
||
yahoo-mail
-
|
Yahoo! Mail.
|
|||
log
-
|
|
Enable/disable logging.
|
||
username
-
/ required
|
FortiOS or FortiGate username.
|
|||
vdom
-
|
Default: "root"
|
Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit.
|
Note
- hosts: localhost
vars:
host: "192.168.122.40"
username: "admin"
password: ""
vdom: "root"
tasks:
- name: Configure AntiSpam profiles.
fortios_spamfilter_profile:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "False"
spamfilter_profile:
state: "present"
comment: "Comment."
external: "enable"
flow-based: "enable"
gmail:
log: "enable"
imap:
action: "pass"
log: "enable"
tag-msg: "<your_own_value>"
tag-type: "subject"
mapi:
action: "pass"
log: "enable"
msn-hotmail:
log: "enable"
name: "default_name_18"
options: "bannedword"
pop3:
action: "pass"
log: "enable"
tag-msg: "<your_own_value>"
tag-type: "subject"
replacemsg-group: "<your_own_value> (source system.replacemsg-group.name)"
smtp:
action: "pass"
hdrip: "disable"
local-override: "disable"
log: "enable"
tag-msg: "<your_own_value>"
tag-type: "subject"
spam-bwl-table: "33 (source spamfilter.bwl.id)"
spam-bword-table: "34 (source spamfilter.bword.id)"
spam-bword-threshold: "35"
spam-filtering: "enable"
spam-iptrust-table: "37 (source spamfilter.iptrust.id)"
spam-log: "disable"
spam-log-fortiguard-response: "disable"
spam-mheader-table: "40 (source spamfilter.mheader.id)"
spam-rbl-table: "41 (source spamfilter.dnsbl.id)"
yahoo-mail:
log: "enable"
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
build
string
|
always |
Build number of the fortigate image
Sample:
1547
|
http_method
string
|
always |
Last method used to provision the content into FortiGate
Sample:
PUT
|
http_status
string
|
always |
Last result given by FortiGate on last operation applied
Sample:
200
|
mkey
string
|
success |
Master key (id) used in the last call to FortiGate
Sample:
id
|
name
string
|
always |
Name of the table used to fulfill the request
Sample:
urlfilter
|
path
string
|
always |
Path of the table used to fulfill the request
Sample:
webfilter
|
revision
string
|
always |
Internal revision number
Sample:
17.0.2.10658
|
serial
string
|
always |
Serial number of the unit
Sample:
FGVMEVYYQT3AB5352
|
status
string
|
always |
Indication of the operation's result
Sample:
success
|
vdom
string
|
always |
Virtual domain used
Sample:
root
|
version
string
|
always |
Version of the FortiGate
Sample:
v5.6.3
|
Hint
If you notice any issues in this documentation you can edit this document to improve it.