Check SPF records published by the domain owners in DNS to fight email address forgery and make it easier to identify spam.
warden --task=antispam:plugin:spf
Option |
Value | Default | Description |
---|---|---|---|
--spf_timeout |
<digit> | 5 | How many seconds to wait for an SPF query to complete, before scanning continues without the SPF result. A numeric value is optionally suffixed by a time unit (s, m, h, d, w, indicating seconds (default), minutes, hours, days, weeks). |
--ignore_received_spf_header |
<1|0> | 0 | By default, to avoid unnecessary DNS lookups, the plugin will try to use the SPF results found in any Received-SPF headers it finds in the message that could only have been added by an internal relay. Set this option to ignore any Received-SPF headers present and to have the plugin perform the SPF check itself. |
--use_newest_received_spf_header |
<1|0> | 0 | By default, when using Received-SPF headers, the plugin will attempt to use the oldest (bottom most) Received-SPF headers, that were added by internal relays, that it can parse results from since they are the most likely to be accurate. This is done so that if you have an incoming mail setup where one of your primary MXes does not know about a secondary MX (or your MXes do not know about some sort of forwarding relay that SA considers trusted+internal) but SA is aware of the actual domain boundary (internal_networks setting) SA will use the results that are most accurate. Use this option to start with the newest (top most) Received-SPF headers, working downwards until results are successfully parsed. |
--welcomelist_from_spf |
<string1,string2> | Works similarly to welcomelist_from, except that in addition to matching a sender address, a check against the domains SPF record must pass. The first parameter is an address to whitelist, and the second is a string to match the relays rDNS. Just like whitelist_from, multiple addresses per line, separated by spaces, are OK. Multiple whitelist_from_spf lines are also OK. The headers checked for whitelist_from_spf addresses are the same headers used for SPF checks (Envelope-From, Return-Path, X-Envelope-From, etc). Since this whitelist requires an SPF check to be made, network tests must be enabled. It is also required that your trust path be correctly configured. See the section on trusted_networks for more info on trust paths. | |
--welcomelist_from_spf_add |
<string1,string2> | Add a single entry to welcomelist_from_spf. | |
--welcomelist_from_spf_del |
<string1,string2> | Remove a single entry from welcomelist_from_spf. | |
--default |
<yes> | Reset all settings to their default values. | |
--default_option |
<option> | Reset a specific setting to its default value. | |
--reload |
<yes> | Reload the service after saving settings. |
// set the spf_timeout
warden --task=antispam:plugin:spf --spf_timeout=10 --reload=yes
// reset spf_timeout to its default value
warden --task=antispam:plugin:spf --default_option=spf_timeout --reload=yes
// reset all settings to their default values
warden --task=antispam:plugin:spf --default=yes --reload=yes