Unix/Linux Go Back    

CentOS 7.0 - man page for mail::dkim::signerpolicy (centos section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

Mail::DKIM::SignerPolicy(3)    User Contributed Perl Documentation    Mail::DKIM::SignerPolicy(3)

       Mail::DKIM::SignerPolicy - determines signing parameters for a message

       A "signer policy" is an object, class, or function used by Mail::DKIM::Signer to determine
       what signatures to add to the current message. To take advantage of signer policies,
       create your own Perl class that extends the Mail::DKIM::SignerPolicy class.  The only
       method you need to implement is the apply() method.

       The apply() method takes as a parameter the Mail::DKIM::Signer object.  Using this object,
       it can determine some properties of the message (e.g.  what the From: address or Sender:
       address is). Then it sets various signer properties as desired. The apply() method should
       return a nonzero value if the message should be signed. If a false value is returned, then
       the message is "skipped" (i.e. not signed).

       Here is an example of a policy that always returns the same values:

	 package MySignerPolicy;
	 use base "Mail::DKIM::SignerPolicy";

	 sub apply
	     my $self = shift;
	     my $signer = shift;


	     return 1;

       To use this policy, simply specify the name of the class as the Policy parameter...

	 my $dkim = Mail::DKIM::Signer->new(
			 Policy => "MySignerPolicy",

       You can also have the policy actually build the signature for the Signer to use. To do
       this, call the signer's add_signature() method from within your apply() callback. E.g.,

	 sub apply
	     my $self = shift;
	     my $signer = shift;

		     new Mail::DKIM::Signature(
			 Algorithm => $signer->algorithm,
			 Method => $signer->method,
			 Headers => $signer->headers,
			 Domain => $signer->domain,
			 Selector => $signer->selector,

       Again, if you do not want any signatures, return zero or undef. If you use add_signature()
       to create a signature, the default signature will not be created, even if you return

       Jason Long, <jlong@messiah.edu>

       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.

perl v5.16.3				    2008-08-25		      Mail::DKIM::SignerPolicy(3)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 11:39 PM.