1 use Mail::DKIM::Signer;
2 use Mail::DKIM::TextWrap; #recommended
5 my $method = "simple/simple";
8 "method=s" => \$method,
11 # create a signer object
12 my $dkim = Mail::DKIM::Signer->new(
13 Algorithm => "rsa-sha1",
17 KeyFile => "aux-fixed/dkim/dkim.private",
20 # read an email and pass it into the signer, one line at a time
23 # remove local line terminators
27 # use SMTP line terminators
28 $dkim->PRINT("$_\015\012");
32 # what is the signature result?
33 my $signature = $dkim->signature;
34 print $signature->as_string;
37 #print $dkim->headers;