DESCRIPTION

The Sender Signing Practices (\s-1SSP\s0) record can be published by any domain to help a receiver know what to do when it encounters an unsigned message claiming to originate from that domain.

The record is published as a \s-1DNS\s0 \s-1TXT\s0 record at _policy._domainkey.DOMAIN where \s-1DOMAIN\s0 is the domain of the message's \*(L"From\*(R" address.

This record format has been superceded by \s-1ADSP\s0. See Mail::DKIM::AuthorDomainPolicy for information about \s-1ADSP\s0. It is implemented here because at one time it appeared this is what would be standardized by the \s-1IETF\s0. It will be removed from Mail::DKIM at some point in the future. The last version of the \s-1SSP\s0 specification can be found at http://tools.ietf.org/html/draft-ietf-dkim-ssp-02 <http://tools.ietf.org/html/draft-ietf-dkim-ssp-02>.

CONSTRUCTORS

\fIfetch()\fP

Lookup a \s-1DKIM\s0 signing practices record.

  my $policy = Mail::DKIM::DkimPolicy->fetch(
            Protocol => "dns",
            Author => '[email protected]',
          );

\fInew()\fP

Construct a default policy object.

my $policy = Mail::DKIM::DkimPolicy->new;

METHODS

\fIapply()\fP

Apply the policy to the results of a \s-1DKIM\s0 verifier.

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.

\fIflags()\fP

Get or set the flags (t=) tag.

A colon-separated list of flags. Flag values are:

y

The entity is testing signing practices, and the Verifier \s-1SHOULD\s0 \s-1NOT\s0 consider a message suspicious based on the record.

s

The signing practices apply only to the named domain, and not to subdomains.

\fIis_implied_default_policy()\fP

Is 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 \*(L"default policy\*(R" is in effect. Use this method to detect when that happens.

\fIlocation()\fP

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, \s-1TBD\s0.

If nothing is published for the domain, and the default policy was returned instead, the location will be \*(C`undef\*(C'.

\fIpolicy()\fP

Get or set the outbound signing policy (dkim=) tag.

my $sp = $policy->policy;

Outbound signing policy for the entity. Possible values are: The default. The entity may sign some or all email. All mail from the entity is signed. (The \s-1DKIM\s0 signature can use any domain, not necessarily matching the From: address.) All mail from the entity is signed with Originator signatures. (The \s-1DKIM\s0 signature uses a domain matching the From: address.)

\fIsignall()\fP

True if policy is \*(L"all\*(R".

\fIsignall_strict()\fP

True if policy is \*(L"strict\*(R".

\fItesting()\fP

Checks the testing flag.

my $testing = $policy->testing;

If nonzero, the testing flag is set on the signing policy, and the verify should not consider a message suspicious based on this policy.

BUGS

  • If a sender signing policy is not found for a given domain, the fetch() method should search the parent domains, according to section 4 of the dkim-ssp Internet Draft.

AUTHOR

Jason Long, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2006-2007 by Messiah College

This 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.