Branch Coverage

blib/lib/Mail/CheckUser.pm
Criterion Covered Total %
branch 63 112 56.2


line true false branch
171 0 57 unless (defined $email)
181 2 55 unless (defined $hostname)
188 28 27 if ($Mail::CheckUser::Skip_Network_Checks) { }
27 0 elsif ($ok) { }
213 47 8 if ($hostname =~ /$HOSTNAME_RE/x) { }
234 39 8 if ($username =~ /$USERNAME_RE/x) { }
254 0 27 if $tout == 0
259 0 27 if $tout == 0
262 13 14 if (@mx) { }
269 0 14 if $tout == 0
275 0 14 if $tout == 0
278 1 13 if ($res) { }
282 1 0 if ($rr->type eq 'A') { }
0 0 elsif ($rr->type eq 'CNAME') { }
293 1 0 if $$Mail::CheckUser::NXDOMAIN{lc $ip}
301 1 42 if $$Mail::CheckUser::NXDOMAIN{lc $mserver}
304 3 9 if ($Mail::CheckUser::Skip_SMTP_Checks) { }
307 0 9 if ($Mail::CheckUser::Skip_SYN) { }
312 0 0 unless ($mserver =~ /^\d+\.\d+\.\d+\.\d+$/)
314 0 0 if $tout == 0
316 0 0 if (my $ans = $resolver->query($mserver))
318 0 0 if ($rr_a->type eq 'A')
326 0 0 if $tout == 0
330 0 0 if $res == 1
331 0 0 if $res == 0
339 0 32 if ($mserver =~ /^\d+\.\d+\.\d+\.\d+$/) { }
343 0 32 if $tout == 0
345 30 2 if (my $ans = $resolver->query($mserver)) { }
347 30 0 if ($rr_a->type eq 'A')
372 30 2 if ($tainted and $tainted eq $mserver and $resolve->{$tainted} and $ping->ping($tainted)) { }
381 0 9 if $tout == 0
384 7 2 if ($resolve->{$mserver}) { }
387 7 0 if ($ping->ack($mserver)) { }
392 3 4 if $res == 1
393 4 0 if $res == 0
426 0 7 if $tout == 0
428 7 0 defined $Mail::CheckUser::Helo_Domain ? :
430 0 7 unless (defined $smtp)
437 1 6 if $tout == 0
441 0 6 unless ($smtp->mail($Mail::CheckUser::Sender_Addr))
445 0 0 if $tout == 0
452 2 4 if ($smtp->to("$username\@$hostname")) { }
455 2 0 if ($tout)
464 0 4 if $tout == 0
472 4 0 if ($code == 550 or $code == 551 or $code == 553) { }
0 0 elsif ($code == 552) { }
0 0 elsif ($code =~ /^4/) { }
499 0 161 if ($timeout < 0) { }
509 0 921 if ($Mail::CheckUser::Debug)
519 91 40 if $code == 0
520 2 129 if $code == 6
521 0 131 if $code == 7 and not $Mail::CheckUser::Treat_Full_As_Fail
522 0 131 if $code == 3 and not $Mail::CheckUser::Treat_Timeout_As_Fail
523 1 130 if $code == 5 and not $Mail::CheckUser::Treat_Timeout_As_Fail
524 0 131 if $code == 8 and not $Mail::CheckUser::Treat_Grey_As_Fail
532 94 37 $ok ? :