.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mail::DomainKeys 3" .TH Mail::DomainKeys 3 2024-07-13 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Mail::DomainKeys \- A perl implementation of DomainKeys .SH CAVEAT .IX Header "CAVEAT" THIS MODULE IS OFFICIALLY UNSUPPORTED. .PP Please move on to DKIM like a responsible Internet user. I have. .PP I will leave this module here on CPAN for a while, just in case someone has grown to depend on it. It is apparent that DK will not be the way of the future. Thus, it is time to put this module to ground before it causes any further harm. .PP Thanks for your support, Anthony .SH SYNOPSIS .IX Header "SYNOPSIS" Mail::DomainKeys is a perl implementation of Yahoo's mail signature protocol. .PP This library allows one to sign and verify signatures as per draft 03 of the DomainKeys specification: .PP http://www.ietf.org/internet\-drafts/draft\-delany\-domainkeys\-base\-03.txt .SS "A Simple Example" .IX Subsection "A Simple Example" This example shows the simplest possible DomainKeys signature verifier. .PP .Vb 1 \& require Mail::DomainKeys::Message; \& \& # load a message from a filehandle glob \& my $mail = load Mail::DomainKeys::Message(File => \e*STDIN) or \& die "unable to load message\en"; \& \& # check to make sure the sender has a fully qualified domain \& $mail\->senderdomain or \& die "unable to verify message: no sender domain\en"; \& \& # check if the mail is signed by DomainKeys \& $mail\->signed or \& die "no signature\en"; \& \& # check the signature \& if ($mail\->verify) { \& print STDERR "signature valid\en"; \& exit 0; \& } \& \& # the signature was not valid \& die "unable to verify signature\en"; .Ve .PP This example shows the simplest possible DomainKeys signer. .PP .Vb 2 \& require Mail::DomainKeys::Message; \& require Mail::DomainKeys::Key::Private; \& \& # load the message, or die trying \& my $mail = load Mail::DomainKeys::Message(File => \e*STDIN) or \& die "unable to load message"; \& \& # load the private key, or die trying \& my $priv = load Mail::DomainKeys::Key::Private(File => "private.key") or \& die "unable to load key"; \& \& # sign the message using the "simple" canonifier and selector "test" \& $mail\->sign(Method => "simple", Selector => "test", Private => $priv); \& \& # print out the signature \& print $mail\->signature\->as_string; .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" .IP Mail::DomainKeys::Message 4 .IX Item "Mail::DomainKeys::Message" .PD 0 .IP Mail::DomainKeys::Policy 4 .IX Item "Mail::DomainKeys::Policy" .PD .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (c) 2005, Anthony D. Urso. All rights reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH AVAILABILITY .IX Header "AVAILABILITY" The latest version of Mail::DomainKeys will be available on CPAN and at: .PP http://killa.net/infosec/Mail\-DomainKeys/ .SH "POD ERRORS" .IX Header "POD ERRORS" Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 91:" 4 .IX Item "Around line 91:" \&'=item' outside of any '=over'