Branch Coverage

blib/lib/Mail/MtPolicyd/Plugin/SPF.pm
Criterion Covered Total %
branch 21 46 45.6


line true false branch
76 0 2 if ($self->get_uc($r->session, 'enabled') eq 'off')
80 0 2 unless ($r->is_attr_defined('client_address'))
85 0 2 if ($self->_whitelist->match_string($r->attr('client_address')))
92 2 0 if ($r->is_attr_defined('helo_name') and $self->check_helo ne 'off')
94 0 2 if (defined $helo_result)
97 0 2 unless ($r->is_attr_defined('sender'))
103 0 2 unless (defined $sender)
132 2 0 defined $helo && length $helo ? :
151 0 4 if ($result->code eq 'neutral') { }
1 3 elsif ($result->code eq 'fail') { }
0 3 elsif ($result->code eq 'softfail') { }
1 2 elsif ($result->code eq 'pass') { }
156 1 0 if (defined $self->fail_score and not $r->is_already_done($self->name . '-score'))
159 1 0 if ($fail_mode eq 'reject')
168 0 0 if (defined $self->softfail_score and not $r->is_already_done($self->name . '-score'))
171 0 0 if ($softfail_mode eq 'reject') { }
0 0 elsif ($softfail_mode eq 'accept' or $softfail_mode eq 'dunno') { }
182 0 1 if ($no_pass_action)
183 1 0 if (defined $self->pass_score and not $r->is_already_done($self->name . '-score'))
186 0 1 if ($pass_mode eq 'accept' or $pass_mode eq 'dunno')
200 1 0 if ($message =~ /%LOCAL_EXPL%/)
204 0 1 if ($message =~ /%AUTH_EXPL%/)
206 0 0 if ($result->can('authority_explanation'))