1Mail::SpamAssassin::PluUgsienr::CSoPnFt(r3i)buted Perl DMoaciulm:e:nStpaatmiAosnsassin::Plugin::SPF(3)
2
3
4
6 Mail::SpamAssassin::Plugin::SPF - perform SPF verification tests
7
9 loadplugin Mail::SpamAssassin::Plugin::SPF
10
12 This plugin checks a message against Sender Policy Framework (SPF)
13 records published by the domain owners in DNS to fight email address
14 forgery and make it easier to identify spams.
15
17 whitelist_from_spf user@example.com
18 Works similarly to whitelist_from, except that in addition to
19 matching a sender address, a check against the domain's SPF record
20 must pass. The first parameter is an address to whitelist, and the
21 second is a string to match the relay's rDNS.
22
23 Just like whitelist_from, multiple addresses per line, separated by
24 spaces, are OK. Multiple "whitelist_from_spf" lines are also OK.
25
26 The headers checked for whitelist_from_spf addresses are the same
27 headers used for SPF checks (Envelope-From, Return-Path,
28 X-Envelope-From, etc).
29
30 Since this whitelist requires an SPF check to be made, network
31 tests must be enabled. It is also required that your trust path be
32 correctly configured. See the section on "trusted_networks" for
33 more info on trust paths.
34
35 e.g.
36
37 whitelist_from_spf joe@example.com fred@example.com
38 whitelist_from_spf *@example.com
39
40 def_whitelist_from_spf user@example.com
41 Same as "whitelist_from_spf", but used for the default whitelist
42 entries in the SpamAssassin distribution. The whitelist score is
43 lower, because these are often targets for spammer spoofing.
44
45 unwhitelist_from_spf user@example.com
46 Used to remove a "whitelist_from_spf" or "def_whitelist_from_spf"
47 entry. The specified email address has to match exactly the
48 address previously used.
49
50 Useful for removing undesired default entries from a distributed
51 configuration by a local or site-specific configuration or by
52 "user_prefs".
53
55 spf_timeout n (default: 5)
56 How many seconds to wait for an SPF query to complete, before
57 scanning continues without the SPF result. A numeric value is
58 optionally suffixed by a time unit (s, m, h, d, w, indicating
59 seconds (default), minutes, hours, days, weeks).
60
61 do_not_use_mail_spf (0|1) (default: 0)
62 By default the plugin will try to use the Mail::SPF module for SPF
63 checks if it can be loaded. If Mail::SPF cannot be used the plugin
64 will fall back to using the legacy Mail::SPF::Query module if it
65 can be loaded.
66
67 Use this option to stop the plugin from using Mail::SPF and cause
68 it to try to use Mail::SPF::Query instead.
69
70 do_not_use_mail_spf_query (0|1) (default: 0)
71 As above, but instead stop the plugin from trying to use
72 Mail::SPF::Query and cause it to only try to use Mail::SPF.
73
74 ignore_received_spf_header (0|1) (default: 0)
75 By default, to avoid unnecessary DNS lookups, the plugin will try
76 to use the SPF results found in any "Received-SPF" headers it finds
77 in the message that could only have been added by an internal
78 relay.
79
80 Set this option to 1 to ignore any "Received-SPF" headers present
81 and to have the plugin perform the SPF check itself.
82
83 Note that unless the plugin finds an "identity=helo", or some
84 unsupported identity, it will assume that the result is a mfrom SPF
85 check result. The only identities supported are "mfrom",
86 "mailfrom" and "helo".
87
88 use_newest_received_spf_header (0|1) (default: 0)
89 By default, when using "Received-SPF" headers, the plugin will
90 attempt to use the oldest (bottom most) "Received-SPF" headers,
91 that were added by internal relays, that it can parse results from
92 since they are the most likely to be accurate. This is done so
93 that if you have an incoming mail setup where one of your primary
94 MXes doesn't know about a secondary MX (or your MXes don't know
95 about some sort of forwarding relay that SA considers
96 trusted+internal) but SA is aware of the actual domain boundary
97 (internal_networks setting) SA will use the results that are most
98 accurate.
99
100 Use this option to start with the newest (top most) "Received-SPF"
101 headers, working downwards until results are successfully parsed.
102
103 has_check_for_spf_errors
104 Adds capability check for "if can()" for check_for_spf_permerror,
105 check_for_spf_temperror, check_for_spf_helo_permerror and
106 check_for_spf_helo_permerror
107
108
109
110perl v5.36.0 2022-07-23Mail::SpamAssassin::Plugin::SPF(3)