Skip to content

Commit

Permalink
1.009 - fixed bug where DNS error was reported when DNS was processed…
Browse files Browse the repository at this point in the history
… before the end of mail
  • Loading branch information
noxxi committed Apr 22, 2019
1 parent 08a66b9 commit 9eb45fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.009 - 2019/04/22
- fixed bug where DNS error was reported when DNS was processed before the end
of mail
1.008 - 2019/04/11
- fail early if bh does not match, don't wait for DNS result
1.007 - 2019/02/29
Expand Down
8 changes: 4 additions & 4 deletions lib/Mail/DKIM/Iterator.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Mail::DKIM::Iterator;
use v5.10.0;

our $VERSION = '1.008';
our $VERSION = '1.009';

use strict;
use warnings;
Expand Down Expand Up @@ -243,11 +243,11 @@ sub _compute_result {
}
$self->{records}{$dns} = $txt = { permfail => $error }
if $error;
} elsif (exists $self->{records}{$dns} && ! $txt) {
$self->{records}{$dns} = $txt = { tempfail => "dns lookup failed" }
}

my @v = _verify_sig($sig,$txt);
@v = (DKIM_TEMPERROR, "dns lookup failed")
if !@v and exists $self->{records}{$dns};
push @rv, Mail::DKIM::Iterator::VerifyRecord->new($sig,$dns,@v);
$sig->{':result'} = $rv[-1] if @v; # we got a final result
}
Expand Down Expand Up @@ -487,7 +487,7 @@ sub sign {

# Verify a DKIM signature (hash from parse_signature) using a DKIM key (hash
# from parse_dkimkey). Output is (error_code,error_string) or simply
# (DKIM_PASS) in case of no error.
# (DKIM_PASS) in case of no error or () if no final result can be computed yet.
sub _verify_sig {
my ($sig,$param) = @_;

Expand Down

0 comments on commit 9eb45fd

Please sign in to comment.