~ubuntu-branches/ubuntu/precise/libmail-dkim-perl/precise

« back to all changes in this revision

Viewing changes to lib/Mail/DKIM/SignerPolicy.pm

  • Committer: Bazaar Package Importer
  • Author(s): Magnus Holmgren
  • Date: 2008-04-20 18:08:09 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080420180809-zyc5v7c9ose28m4p
Tags: 0.31-1
* New upstream release (Closes: 476908).
* Change debian/watch to use search.cpan.org only.
* New maintainer email address.
* Increase minimum version of libcrypt-openssl-rsa-perl to 0.24 (should
  have done that at version 0.28 of this package).

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
=head1 DESCRIPTION
23
23
 
24
 
Objects of type Mail::DKIM::SignerPolicy are used by Mail::DKIM::Signer.
25
 
To take advantage of policy objects, create your own Perl class that
26
 
extends this class. The only method you need to provide is the apply()
27
 
method.
 
24
A "signer policy" is an object, class, or function used by
 
25
L<Mail::DKIM::Signer> to determine what signatures to add to the
 
26
current message. To take advantage of signer policies, create your
 
27
own Perl class that extends the L<Mail::DKIM::SignerPolicy> class.
 
28
The only method you need to implement is the apply() method.
28
29
 
29
 
The apply() method takes as a parameter the Mail::DKIM::Signer object.
 
30
The apply() method takes as a parameter the L<Mail::DKIM::Signer> object.
30
31
Using this object, it can determine some properties of the message (e.g.
31
32
what the From: address or Sender: address is). Then it sets various
32
33
signer properties as desired. The apply() method should
47
48
      $signer->method("relaxed");
48
49
      $signer->domain("example.org");
49
50
      $signer->selector("selector1");
 
51
      $signer->key_file("private.key");
50
52
  
51
53
      return 1;
52
54
  }
54
56
To use this policy, simply specify the name of the class as the Policy
55
57
parameter...
56
58
 
57
 
  my $dkim = Mail::DKIM::Signer->new_object(
 
59
  my $dkim = Mail::DKIM::Signer->new(
58
60
                  Policy => "MySignerPolicy",
59
 
                  KeyFile => "private.key"
60
61
             );
61
62
 
62
63
=head1 ADVANCED