Branch Coverage

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


line true false branch
166 0 53 unless (defined $email)
176 2 51 unless (defined $hostname)
183 28 23 if ($Mail::CheckUser::Skip_Network_Checks) { }
23 0 elsif ($ok) { }
208 43 8 if ($hostname =~ /$HOSTNAME_RE/x) { }
229 35 8 if ($username =~ /$USERNAME_RE/x) { }
249 0 23 if $tout == 0
254 0 23 if $tout == 0
257 10 13 if (@mx) { }
264 0 13 if $tout == 0
270 0 13 if $tout == 0
273 1 12 if ($res) { }
277 1 0 if ($rr->type eq 'A') { }
0 0 elsif ($rr->type eq 'CNAME') { }
288 0 1 if $$Mail::CheckUser::NXDOMAIN{lc $ip}
296 0 25 if $$Mail::CheckUser::NXDOMAIN{lc $mserver}
299 5 6 if ($Mail::CheckUser::Skip_SMTP_Checks) { }
302 0 6 if ($Mail::CheckUser::Skip_SYN) { }
307 0 0 unless ($mserver =~ /^\d+\.\d+\.\d+\.\d+$/)
309 0 0 if $tout == 0
311 0 0 if (my $ans = $resolver->query($mserver))
313 0 0 if ($rr_a->type eq 'A')
321 0 0 if $tout == 0
325 0 0 if $res == 1
326 0 0 if $res == 0
334 0 13 if ($mserver =~ /^\d+\.\d+\.\d+\.\d+$/) { }
338 0 13 if $tout == 0
340 12 1 if (my $ans = $resolver->query($mserver)) { }
342 12 0 if ($rr_a->type eq 'A')
367 12 1 if ($tainted and $tainted eq $mserver and $resolve->{$tainted} and $ping->ping($tainted)) { }
376 0 9 if $tout == 0
379 8 1 if ($resolve->{$mserver}) { }
382 8 0 if ($ping->ack($mserver)) { }
387 1 7 if $res == 1
388 3 4 if $res == 0
421 0 8 if $tout == 0
423 0 8 defined $Mail::CheckUser::Helo_Domain ? :
425 0 8 unless (defined $smtp)
432 1 7 if $tout == 0
436 4 3 unless ($smtp->mail($Mail::CheckUser::Sender_Addr))
440 0 4 if $tout == 0
447 0 3 if ($smtp->to("$username\@$hostname")) { }
450 0 0 if ($tout)
459 0 3 if $tout == 0
467 3 0 if ($code == 550 or $code == 551 or $code == 553) { }
0 0 elsif ($code == 552) { }
0 0 elsif ($code =~ /^4/) { }
494 0 125 if ($timeout < 0) { }
504 0 728 if ($Mail::CheckUser::Debug)
514 83 36 if $code == 0
515 2 117 if $code == 6
516 0 119 if $code == 7 and not $Mail::CheckUser::Treat_Full_As_Fail
517 0 119 if $code == 3 and not $Mail::CheckUser::Treat_Timeout_As_Fail
518 1 118 if $code == 5 and not $Mail::CheckUser::Treat_Timeout_As_Fail
519 0 119 if $code == 8 and not $Mail::CheckUser::Treat_Grey_As_Fail
527 86 33 $ok ? :