1Mail::SPF::Mech::MX(3)User Contributed Perl DocumentationMail::SPF::Mech::MX(3)
2
3
4

NAME

6       Mail::SPF::Mech::MX - SPF record "mx" mechanism class
7

DESCRIPTION

9       An object of class Mail::SPF::Mech::MX represents an SPF record
10       mechanism of type "mx".
11
12   Constructors
13       The following constructors are provided:
14
15       new(%options): returns Mail::SPF::Mech::MX
16           Creates a new SPF record "mx" mechanism object.
17
18           %options is a list of key/value pairs representing any of the
19           following options:
20
21           qualifier
22           domain_spec
23           ipv4_prefix_length
24           ipv6_prefix_length
25               See "new" in Mail::SPF::Mech.
26
27       new_from_string($text, %options): returns Mail::SPF::Mech::MX; throws
28       Mail::SPF::ENothingToParse, Mail::SPF::EInvalidMech
29           Creates a new SPF record "mx" mechanism object by parsing the
30           string and any options given.
31
32   Class methods
33       The following class methods are provided:
34
35       default_qualifier
36       default_ipv4_prefix_length
37       default_ipv6_prefix_length
38       qualifier_pattern
39           See "Class methods" in Mail::SPF::Mech.
40
41       name: returns string
42           Returns 'mx'.
43
44       name_pattern: returns Regexp
45           Returns a regular expression that matches a mechanism name of 'mx'.
46
47   Instance methods
48       The following instance methods are provided:
49
50       text
51       qualifier
52       params
53       stringify
54       domain
55       match_in_domain
56           See "Instance methods" in Mail::SPF::Mech.
57
58       domain_spec: returns Mail::SPF::MacroString
59           Returns the "domain-spec" parameter of the mechanism.
60
61       ipv4_prefix_length: returns integer
62           Returns the IPv4 network prefix length of the mechanism.
63
64       ipv6_prefix_length: returns integer
65           Returns the IPv6 network prefix length of the mechanism.
66
67       match($server, $request): returns boolean
68           Checks whether any MX hosts of the mechanism's target domain name
69           (that is, any of the host addresses of its DNS "MX" records)
70           matches the given request's IP address (see "ip_address" in
71           Mail::SPF::Request), and returns true if it does, or false
72           otherwise.  The mechanism's IP network prefix lengths are respected
73           when matching address records against the request's IP address.
74           See RFC 4408, 5 and 5.4, for the exact algorithm used.
75

SEE ALSO

77       Mail::SPF, Mail::SPF::Record, Mail::SPF::Term, Mail::SPF::Mech
78
79       <http://tools.ietf.org/html/rfc4408>
80
81       For availability, support, and license information, see the README file
82       included with Mail::SPF.
83

AUTHORS

85       Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org>
86
87
88
89perl v5.32.0                      2020-07-28            Mail::SPF::Mech::MX(3)
Impressum