DomainKeys sender signing policies are described in RFC4870(historical).
It is a record published in the message sender's (i.e.
the person who transmitted the message) DNS that describes how they sign messages.

the "author" of the message for which policy is being checked. This is the first email address in the "From" header. According to RFC 2822, section 3.6.2, the "From" header lists who is responsible for writing the message.

the "sender" of the message for which policy is being checked. This is the first email address in the "Sender" header, or if there is not a "Sender" header, the "From" header. According to RFC 2822, section 3.6.2, the "Sender" header lists who is responsible for transmitting the message.

Depending on what type of policy is being checked, both the Sender and Author fields may need to be specified.

If a DNS error or timeout occurs, an exception is thrown.

Otherwise, a policy object of some sort will be returned. If no policy is actually published, then the "default policy" will be returned. To check when this happens, use

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.