in reply to Re: Filehandle with DKIM::Verifier
in thread Filehandle with DKIM::Verifier
This is the code form my small test script:
#! /usr/bin/perl use strict; use warnings; use Mail::DKIM::Verifier; my $raw_email; my $dkim = Mail::DKIM::Verifier->new(); open (MESSAGE, "< $ARGV[0]") || die "Couldn't open email $ARGV[0]\n"; undef $/; $raw_email = <>; close MESSAGE; print "$ARGV"; open(my $fh, "<", "$ARGV") or die "Can't open < $ARGV: $!"; $dkim->load($fh); my $result = $dkim->result; print "\n$result"; foreach my $signature ($dkim->signatures) { print "signature identity: " . $signature->identity . "\n"; print "verify result: " . $signature->result_detail . "\n"; }
I have tested this script with differed emails. Test files with correct, wrong and missing DKIM signature. The script returns always "none" (my $result = $dkim->result;) and $signature is an empty variable.
It seams that this script canīt find a DKIM signature in the test files.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Filehandle with DKIM::Verifier
by hippo (Archbishop) on Oct 16, 2017 at 08:11 UTC | |
by nifu (Novice) on Oct 16, 2017 at 08:18 UTC | |
by hippo (Archbishop) on Oct 16, 2017 at 10:23 UTC |