Mail::DKIM::AuthorDomainPolicy (3)
Leading comments
Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) Standard preamble: ========================================================================
NAME
Mail::DKIM::AuthorDomainPolicy - represents an Author Domain Signing Practices (ADSP) recordDESCRIPTION
The Author Domain Signing Policies (The record is published as a
More details about this record can be found by reading the specification itself at <tools.ietf.org/html/rfc5617>.
CONSTRUCTORS
fetch()
Lookup an
my $policy = Mail::DKIM::AuthorDomainPolicy->fetch( Protocol => "dns", Author => 'jsmith@example.org', );
If the
new()
Construct a default policy object.
my $policy = Mail::DKIM::AuthorDomainPolicy->new;
parse()
Construct an
my $policy = Mail::DKIM::AuthorDomainPolicy->parse( String => "dkim=all", Domain => "aaa.example", );
METHODS
apply()
Apply the policy to the results of a
my $result = $policy->apply($dkim_verifier);
The caller must provide an instance of Mail::DKIM::Verifier, one which has already been fed the message being verified.
Possible results are:
- accept
- The message is approved by the sender signing policy.
- reject
- The message is rejected by the sender signing policy. It can be considered very suspicious.
- neutral
- The message is neither approved nor rejected by the sender signing policy. It can be considered somewhat suspicious.
Note: in the future, these values may become:
none - no
pass - a passing signature is present
fail -
discard -
nxdomain - the
temperror - transient error occurred
permerror - non-transient error occurred
is_implied_default_policy()
Tells whether this policy implied.
my $is_implied = $policy->is_implied_default_policy;
If you fetch the policy for a particular domain, but that domain does not have a policy published, then the ``default policy'' is in effect. Use this method to detect when that happens.
location()
Tells where the policy was fetched from.If the policy is domain-wide, this will be domain where the policy was published.
If the policy is user-specific,
If nothing is published for the domain, and the default policy was returned instead, the location will be "undef".
policy()
Get or set the outbound signing policy (dkim=) tag.
my $sp = $policy->policy;
Outbound signing policy for the entity. Possible values are:
- unknown
- The default. The entity may sign some or all email.
- all
- All mail from the domain is expected to be signed, using a valid Author signature, but the author does not suggest discarding mail without a valid signature.
- discardable
- All mail from the domain is expected to be signed, using a valid Author signature, and the author is so confident that non-signed mail claiming to be from this domain can be automatically discarded by the recipient's mail server.
- NXDOMAIN
-
The domain is out of scope, i.e., the domain does not exist in the
DNS.
signall()
True if policy is ``all''.signall_discardable()
True if policy is ``strict''.BUGS
- *
-
Section 4.3 of the specification says to perform a query on the
domain itself just to see if it exists. This class is not
currently doing that, i.e. it might report NXDOMAINbecause _adsp._domainkey.example.org is nonexistent, but it should not be treated the same as example.org being nonexistent.
AUTHOR
Jason Long, <jlong@messiah.edu>COPYRIGHT AND LICENSE
Copyright (C) 2006-2009 by Messiah CollegeThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.