1Mail::DKIM::AuthorDomaiUnsPeorliCcoyn(t3r)ibuted Perl DoMcauimle:n:tDaKtIiMo:n:AuthorDomainPolicy(3)
2
3
4
6 Mail::DKIM::AuthorDomainPolicy - represents an Author Domain Signing
7 Practices (ADSP) record
8
10 The Author Domain Signing Policies (ADSP) record can be published by
11 any domain to help a receiver know what to do when it encounters an
12 unsigned message claiming to originate from that domain.
13
14 The record is published as a DNS TXT record at _adsp._domainkey.DOMAIN
15 where DOMAIN is the domain of the message's "From" address.
16
17 More details about this record can be found by reading the
18 specification itself at <http://tools.ietf.org/html/rfc5617>.
19
21 fetch()
22 Lookup an ADSP record in DNS.
23
24 my $policy = Mail::DKIM::AuthorDomainPolicy->fetch(
25 Protocol => "dns",
26 Author => 'jsmith@example.org',
27 );
28
29 If the ADSP record is found and appears to be valid, an object
30 containing that record's information will be constructed and returned.
31 If the ADSP record is blank or simply does not exist, an object
32 representing the default policy will be returned instead. (See also
33 "is_implied_default_policy()".) If a DNS error occurs (e.g. SERVFAIL
34 or time-out), this method will "die".
35
36 new()
37 Construct a default policy object.
38
39 my $policy = Mail::DKIM::AuthorDomainPolicy->new;
40
41 parse()
42 Construct an ADSP record from a string.
43
44 my $policy = Mail::DKIM::AuthorDomainPolicy->parse(
45 String => "dkim=all",
46 Domain => "aaa.example",
47 );
48
50 apply()
51 Apply the policy to the results of a DKIM verifier.
52
53 my $result = $policy->apply($dkim_verifier);
54
55 The caller must provide an instance of Mail::DKIM::Verifier, one which
56 has already been fed the message being verified.
57
58 Possible results are:
59
60 accept
61 The message is approved by the sender signing policy.
62
63 reject
64 The message is rejected by the sender signing policy. It can be
65 considered very suspicious.
66
67 neutral
68 The message is neither approved nor rejected by the sender signing
69 policy. It can be considered somewhat suspicious.
70
71 Note: in the future, these values may become:
72 none - no ADSP record is published
73 pass - a passing signature is present
74 fail - ADSP record is "all" and no passing signature is found
75 discard - ADSP record is "discardable" and no passing signature is
76 found
77 nxdomain - the DNS domain does not exist
78 temperror - transient error occurred
79 permerror - non-transient error occurred
80
81 is_implied_default_policy()
82 Tells whether this policy implied.
83
84 my $is_implied = $policy->is_implied_default_policy;
85
86 If you fetch the policy for a particular domain, but that domain does
87 not have a policy published, then the "default policy" is in effect.
88 Use this method to detect when that happens.
89
90 location()
91 Tells where the policy was fetched from.
92
93 If the policy is domain-wide, this will be domain where the policy was
94 published.
95
96 If the policy is user-specific, TBD.
97
98 If nothing is published for the domain, and the default policy was
99 returned instead, the location will be "undef".
100
101 policy()
102 Get or set the outbound signing policy (dkim=) tag.
103
104 my $sp = $policy->policy;
105
106 Outbound signing policy for the entity. Possible values are:
107
108 "unknown"
109 The default. The entity may sign some or all email.
110
111 "all"
112 All mail from the domain is expected to be signed, using a valid
113 Author signature, but the author does not suggest discarding mail
114 without a valid signature.
115
116 "discardable"
117 All mail from the domain is expected to be signed, using a valid
118 Author signature, and the author is so confident that non-signed
119 mail claiming to be from this domain can be automatically discarded
120 by the recipient's mail server.
121
122 "NXDOMAIN"
123 The domain is out of scope, i.e., the domain does not exist in the
124 DNS.
125
126 signall()
127 True if policy is "all".
128
129 signall_discardable()
130 True if policy is "strict".
131
133 ยท Section 4.3 of the specification says to perform a query on the
134 domain itself just to see if it exists. This class is not currently
135 doing that, i.e. it might report NXDOMAIN because
136 _adsp._domainkey.example.org is nonexistent, but it should not be
137 treated the same as example.org being nonexistent.
138
140 Jason Long, <jlong@messiah.edu>
141
143 Copyright (C) 2006-2009 by Messiah College
144
145 This library is free software; you can redistribute it and/or modify it
146 under the same terms as Perl itself, either Perl version 5.8.6 or, at
147 your option, any later version of Perl 5 you may have available.
148
149
150
151perl v5.12.2 2010-01-23 Mail::DKIM::AuthorDomainPolicy(3)