1Mail::SPF::Mech::A(3) User Contributed Perl DocumentationMail::SPF::Mech::A(3)
2
3
4
6 Mail::SPF::Mech::A - SPF record "a" mechanism class
7
9 An object of class Mail::SPF::Mech::A represents an SPF record
10 mechanism of type "a".
11
12 Constructors
13 The following constructors are provided:
14
15 new(%options): returns Mail::SPF::Mech::A
16 Creates a new SPF record "a" 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::A; throws
28 Mail::SPF::ENothingToParse, Mail::SPF::EInvalidMech
29 Creates a new SPF record "a" mechanism object by parsing the string
30 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 'a'.
43
44 name_pattern: returns Regexp
45 Returns a regular expression that matches a mechanism name of 'a'.
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 the mechanism's target domain name (that is, any of
69 its DNS "A" or "AAAA" host addresses) matches the given request's
70 IP address (see "ip_address" in Mail::SPF::Request), and returns
71 true if it does, or false otherwise. The mechanism's IP network
72 prefix lengths are respected when matching address records against
73 the request's IP address. See RFC 4408, 5, for the exact algorithm
74 used.
75
77 Mail::SPF, Mail::SPF::Record, Mail::SPF::Term, Mail::SPF::Mech
78
79 <http://www.ietf.org/rfc/rfc4408.txt>
80
81 For availability, support, and license information, see the README file
82 included with Mail::SPF.
83
85 Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org>
86
87
88
89perl v5.12.2 2010-12-06 Mail::SPF::Mech::A(3)