Package: libmail-dkim-perl Version: 0.32-1
When I tried to use libmail-dkim-perl to verify a signature, authorised by the domain gmail.com (selector gamma), the result obtained was that the Verifier failed to detect any headers. I was using a perl script file, copied from the manpage and with a print instruction appended, I attach a copy called DKIM_Verifier_raw. It printed "none" and " none". I had hoped for "pass" and " pass". The file which I used as input was an e-mail saved by kmail. The command line which I used was: /usr/bin/perl5 DKIM_Verifier_raw < June\ Update.mbox After that I edited the copy of the perl script file-- I commented out '$dkim->load(*STDIN);' I added a line 's/\012$//;' immediately before 's/\015$//;' . This seems to work. It printed 'pass' and ' pass' , or 'fail' and ' fail (body has been altered)' , according to whether I had modified the content of the *.mbox file. I attach a copy of this script file, it is called DKIM-Verifier000.pl . I suggest that the man page be altered to include a line 's/\012$//;' immediately before the line 's/\015$//;' . and that a similar change be made to the effect of $dkim->load(*STDIN); . I attach a copy of the output obtained by "dpkg -l '*mail*' |egrep ^[^pu]" . Best regards Richard Betham
use Mail::DKIM::Verifier; # create a verifier object my $dkim = Mail::DKIM::Verifier->new(); # read an email from a file handle $dkim->load(*STDIN); # or read an email and pass it into the verifier, incrementally while (<STDIN>) { # remove local line terminators chomp; s/\015$//; # use SMTP line terminators $dkim->PRINT("$_\015\012"); } $dkim->CLOSE; # what is the result of the verify? my $result = $dkim->result; my $detail = $dkim->result_detail; print "$result \n\n $detail \n" ;
#!/usr/bin/perl # copied from man page for libmail-dkim-perl version 0.32-1, and then edited by R. Betham 2010 September # pragma # strict use Mail::DKIM::Verifier; print "This file expects an email message on its input. \n"; print "Try the command \" $0 < something.mbox \" .\n"; # create a verifier object my $dkim = Mail::DKIM::Verifier->new(); # read an email from a file handle # $dkim->load(*STDIN); # or read an email and pass it into the verifier, incrementally while (<STDIN>) { # remove local line terminators chomp; # line terminators might be CR or LF or both # libmail-dkim-perl 0.32-1 assumed otherwise # next line added by R. Betham s/\012$//; s/\015$//; # use SMTP line terminators $dkim->PRINT("$_\015\012"); } $dkim->CLOSE; # what is the result of the verify? my $result = $dkim->result; my $detail = $dkim->result_detail; print "$result \n\n $detail \n" ;
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-====================================-====================================-============================================ ii bsd-mailx 8.1.2-0.20071201cvs-3 A simple mail user agent ii kmail 4:3.5.9-5 KDE Email client ii kmailcvt 4:3.5.9-5 KDE KMail mail folder converter ii libmail-box-perl 2.082-2 Manage a message-folder ii libmail-dkim-perl 0.32-1 cryptographically identify the sender of ema ii libmail-sendmail-perl 0.79-5 Send email from a perl script ii libmail-spf-perl 2.005-1 Perl implementation of Sender Policy Framewo ii libmailtools-perl 2.03-1 Manipulate email in perl programs ii procmail 3.22-16 Versatile e-mail processor