Branch Coverage

blib/lib/Mail/Milter/Authentication/Handler/DKIM.pm
Criterion Covered Total %
branch 61 106 57.5


line true false branch
59 28 0 unless exists $config->{'hide_domainkeys'}
60 0 0 if $config->{'hide_domainkeys'}
66 0 1085 if $self->{'failmode'}
72 150 935 if (lc $header eq 'dkim-signature')
77 150 0 if ($parsed)
80 150 0 if ($selector and $domain)
91 0 1085 if (lc $header eq 'domainkey-signature')
92 0 0 if $self->show_domainkeys
100 0 164 if $self->{'failmode'}
103 46 118 if ($self->{'has_dkim'} == 0) { }
106 45 1 unless ($config->{'hide_none'})
118 2 116 if ($config->{'no_strict'})
123 118 0 if ($Mail::DKIM::VERSION >= 0.4)
129 0 118 if (my $error = $@)
145 0 118 if (my $error = $@)
163 0 164 if $self->{'failmode'}
164 46 118 if $self->{'has_dkim'} == 0
168 0 118 if ($self->{'carry'} ne '') { }
176 0 118 if (substr($dkim_chunk, -1) eq "\r")
187 0 118 if (my $error = $@)
200 46 118 if $self->{'has_dkim'} == 0
201 0 118 if $self->{'failmode'}
219 0 118 unless ($dkim->signatures)
220 0 0 unless ($config->{'hide_none'} and $dkim_result eq 'none')
229 150 0 $otype eq 'Mail::DKIM::Signature' ? :
0 150 $otype eq 'Mail::DKIM::DkSignature' ? :
241 88 62 if ($signature_result eq 'pass')
245 24 126 if ($signature_result eq 'invalid')
246 0 24 if ($signature_result_detail =~ /DNS query timeout for (.*) at /)
254 62 88 if ($signature_result ne 'pass' and $signature_result ne 'none')
256 62 0 if ($1)
260 150 0 unless ($config->{'hide_none'} and $signature_result eq 'none')
290 0 150 if ($type eq 'domainkeys') { }
291 0 0 if ($self->show_domainkeys)
296 0 0 if ($config->{'extra_properties'})
313 12 138 if ($config->{'extra_properties'})
323 28 2 if ($config->{'check_adsp'} and $self->is_local_ip_address == 0 and $self->is_trusted_ip_address == 0 and $self->is_authenticated == 0)
337 28 0 $otype eq 'Mail::DKIM::DkPolicy' ? :
28 28 $otype eq 'Mail::DKIM::DkimPolicy' ? :
28 56 $otype eq 'Mail::DKIM::AuthorDomainPolicy' ? :
347 56 28 $default ? :
349 0 84 if $type eq 'x-dkim-dkssp' and not $self->show_domainkeys
351 36 0 $apply eq 'neutral' ? :
0 36 $apply eq 'reject' ? :
48 36 $apply eq 'accept' ? :
357 84 0 unless ($config->{'adsp_hide_none'} and $result eq 'none')
358 28 56 if (not $default or $config->{'show_default_adsp'})
360 0 28 $default ? :
28 0 $location ? :
373 0 118 if (my $error = $@)
399 0 0 if ($error =~ /^DNS error: query timed out/ or $error =~ /^DNS query timeout/) { }
0 0 elsif ($error =~ /^DNS error: SERVFAIL/) { }
0 0 elsif ($error =~ /^no domain to fetch policy for$/ or $error =~ /^policy syntax error$/ or $error =~ /^empty domain label/ or $error =~ /^invalid name /) { }