1Mail::DKIM::Policy(3) User Contributed Perl DocumentationMail::DKIM::Policy(3)
2
3
4
6 Mail::DKIM::Policy - abstract base class for originator "signing"
7 policies
8
10 # get all policies that apply to a verified message
11 foreach my $policy ($dkim->policies)
12 {
13
14 # the name of this policy
15 my $name = $policy->name;
16
17 # the location in DNS where this policy was found
18 my $location = $policy->location;
19
20 # apply this policy to the message being verified
21 my $result = $policy->apply($dkim);
22
23 }
24
26 Between the various versions of the DomainKeys/DKIM standards, several
27 different forms of sender "signing" policies have been defined. In
28 order for the Mail::DKIM library to support these different policies,
29 it uses several different subclasses. All subclasses support this
30 general interface, so that a program using Mail::DKIM can support any
31 and all policies found for a message.
32
34 These methods are supported by all classes implementing the
35 Mail::DKIM::Policy interface.
36
37 apply()
38 Apply the policy to the results of a DKIM verifier.
39
40 my $result = $policy->apply($dkim_verifier);
41
42 The caller must provide an instance of Mail::DKIM::Verifier, one which
43 has already been fed the message being verified.
44
45 Possible results are:
46
47 accept
48 The message is approved by the sender signing policy.
49
50 reject
51 The message is rejected by the sender signing policy.
52
53 neutral
54 The message is neither approved nor rejected by the sender signing
55 policy. It can be considered suspicious.
56
57 as_string()
58 The policy as a string.
59
60 Note that the string returned by this method will not necessarily have
61 the tags ordered the same as the text record found in DNS.
62
63 is_implied_default_policy()
64 Is this policy implied?
65
66 my $is_implied = $policy->is_implied_default_policy;
67
68 If you fetch the policy for a particular domain, but that domain does
69 not have a policy published, then the "default policy" is in effect.
70 Use this method to detect when that happens.
71
72 location()
73 Where the policy was fetched from.
74
75 This is generally a domain name, the domain name where the policy was
76 published.
77
78 If nothing is published for the domain, and the default policy was
79 returned instead, the location will be "undef".
80
81 name()
82 Identify what type of policy this is.
83
84 This currently returns strings like "sender", "author", and "ADSP". It
85 is subject to change in the next version of Mail::DKIM.
86
88 Mail::DKIM::DkPolicy - for RFC4870(historical) DomainKeys sender
89 signing policies
90
91 Mail::DKIM::DkimPolicy - for early draft DKIM sender signing policies
92
93 Mail::DKIM::AuthorDomainPolicy - for Author Domain Signing Practices
94 (ADSP)
95
97 Jason Long, <jlong@messiah.edu>
98
100 Copyright (C) 2006-2009 by Messiah College
101
102 This library is free software; you can redistribute it and/or modify it
103 under the same terms as Perl itself, either Perl version 5.8.6 or, at
104 your option, any later version of Perl 5 you may have available.
105
106
107
108perl v5.30.1 2020-01-30 Mail::DKIM::Policy(3)