line |
true |
false |
branch |
164
|
0 |
1 |
if defined $self->{'debug'} and $self->{'debug'} ne "" |
165
|
0 |
1 |
if defined $self->{'allow_ip_address_as_mx'} and $self->{'allow_ip_address_as_mx'} ne "" |
166
|
0 |
1 |
if defined $self->{'flag_intranets'} and $self->{'flag_intranets'} ne "" |
167
|
0 |
1 |
if defined $self->{'resolution_problem_return'} and $self->{'resolution_problem_return'} ne "" |
168
|
0 |
1 |
if defined $self->{'query_timeout'} and $self->{'query_timeout'} ne "" |
187
|
13 |
24 |
if ($reason ne "") |
206
|
1 |
35 |
if (uc ref $_[0] eq "NET::VALIDMX") |
214
|
34 |
2 |
if ($#_ % 2 == 0) { } |
220
|
0 |
0 |
unless $params{'email'} or $params{'sender'} |
223
|
35 |
1 |
unless defined $params{'debug'} |
224
|
35 |
1 |
unless defined $params{'allow_ip_address_as_mx'} |
225
|
36 |
0 |
unless defined $params{'resolution_problem_return'} |
226
|
36 |
0 |
unless defined $params{'query_timeout'} |
228
|
36 |
0 |
if ($params{'resolution_problem_return'} > 0) { } |
234
|
1 |
35 |
if $params{'debug'} |
235
|
1 |
35 |
if $params{'debug'} |
236
|
1 |
35 |
if $params{'debug'} |
237
|
1 |
35 |
if $params{'debug'} |
245
|
36 |
0 |
if (defined $res) { } |
259
|
1 |
35 |
if ($domain =~ /^\[.*\]$/) |
261
|
0 |
1 |
if $params{'debug'} |
269
|
0 |
35 |
unless (defined $packet) |
270
|
0 |
0 |
if $params{'debug'} |
271
|
0 |
0 |
if $params{'debug'} |
275
|
1 |
34 |
if $params{'debug'} |
277
|
33 |
2 |
if ($packet->header->ancount > 0) { } |
278
|
33 |
0 |
if (defined $packet->answer) |
282
|
4 |
39 |
if ($answer[$i]->type ne 'MX') { } |
284
|
0 |
4 |
if $params{'debug'} |
292
|
1 |
32 |
if $params{'debug'} |
293
|
2 |
31 |
if (scalar @unsorted_answer < 1) { } |
303
|
1 |
37 |
if $params{'debug'} |
306
|
0 |
38 |
if ($answer[$i]->exchange eq "localhost") |
308
|
0 |
0 |
if $params{'debug'} |
313
|
0 |
0 |
if ($answer[$i]->exchange eq "" and int $answer[$i]->preference == 0 and $i == $#answer) |
317
|
0 |
0 |
if $params{'debug'} |
322
|
36 |
2 |
if ($answer[$i]->exchange ne "" and not $answer[$i]->exchange =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) |
325
|
0 |
36 |
unless (defined $packet) |
327
|
0 |
0 |
if $params{'debug'} |
330
|
1 |
35 |
if $params{'debug'} |
333
|
7 |
29 |
if (defined $packet and $packet->header->ancount < 1) |
336
|
0 |
7 |
unless (defined $packet) |
338
|
0 |
0 |
if $params{'debug'} |
341
|
0 |
7 |
if $params{'debug'} |
345
|
31 |
7 |
if (defined $packet and $packet->header->ancount > 0) { } |
348
|
1 |
30 |
if $params{'debug'} |
349
|
29 |
2 |
if ($answer2[0]->type =~ /^A{1,4}/) { } |
|
2 |
0 |
elsif ($answer2[0]->type eq 'CNAME') { } |
350
|
1 |
28 |
if $params{'debug'} |
352
|
2 |
27 |
if ($rv == 1 or $rv == 2 and $i == $#answer) { } |
|
22 |
5 |
elsif ($rv < 1) { } |
353
|
1 |
1 |
if ($rv == 2) |
356
|
0 |
2 |
if $params{'debug'} |
359
|
1 |
21 |
if $params{'debug'} |
365
|
0 |
2 |
unless (defined $packet) |
367
|
0 |
0 |
if $params{'debug'} |
371
|
2 |
0 |
if ($packet->header->ancount > 0) { } |
372
|
2 |
0 |
if (defined $packet->answer) |
374
|
0 |
2 |
if $params{'debug'} |
375
|
1 |
1 |
if ($answer3[0]->type eq 'A') { } |
377
|
0 |
1 |
if ($rv == 1 or $rv == 2 and $i == $#answer) { } |
|
1 |
0 |
elsif ($rv < 1) { } |
378
|
0 |
0 |
if ($rv == 2) |
381
|
0 |
0 |
if $params{'debug'} |
384
|
0 |
1 |
if $params{'debug'} |
390
|
0 |
1 |
if $params{'debug'} |
395
|
0 |
0 |
if ($params{'allow_ip_address_as_mx'} > 0 and $answer[$i]->exchange =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) |
397
|
0 |
0 |
if ($rv) { } |
400
|
0 |
0 |
if $params{'debug'} |
407
|
0 |
0 |
if $params{'debug'} |
414
|
0 |
7 |
if ($answer[$i]->exchange eq '') { } |
415
|
0 |
0 |
if ($i == $#answer) |
417
|
0 |
0 |
if $params{'debug'} |
422
|
2 |
5 |
if ($params{'allow_ip_address_as_mx'} > 0 and $answer[$i]->exchange =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) |
424
|
1 |
1 |
if ($rv) { } |
427
|
0 |
1 |
if $params{'debug'} |
437
|
3 |
2 |
if ($i == $#answer) |
441
|
0 |
3 |
if $params{'debug'} |
452
|
0 |
4 |
if $params{'debug'} |
454
|
4 |
0 |
if ($check_implicit_mx > 0) |
456
|
4 |
0 |
if (defined $rv) |
461
|
0 |
0 |
if $params{'debug'} |
462
|
0 |
0 |
if $params{'debug'} |
466
|
0 |
0 |
if $params{'debug'} |
478
|
4 |
0 |
if ($resolution_problem_return > 0) { } |
484
|
0 |
4 |
if $debug |
487
|
0 |
4 |
unless (defined $packet) |
489
|
0 |
0 |
if $debug |
493
|
0 |
4 |
if $debug |
494
|
3 |
1 |
if ($packet->header->ancount > 0) { } |
496
|
1 |
2 |
if ($answer[0]->type eq 'A') { } |
|
2 |
0 |
elsif ($answer[0]->type eq 'CNAME') { } |
497
|
0 |
1 |
if $debug |
499
|
0 |
1 |
if ($rv) { } |
500
|
0 |
0 |
if $debug |
503
|
0 |
1 |
if $debug |
508
|
0 |
2 |
if $debug |
511
|
0 |
2 |
unless (defined $packet) |
513
|
0 |
0 |
if $debug |
517
|
2 |
0 |
if ($packet->header->ancount > 0) |
518
|
2 |
0 |
if (defined $packet->answer) |
520
|
1 |
1 |
if ($answer2[0]->type eq 'A') { } |
521
|
0 |
1 |
if $debug |
523
|
0 |
1 |
if ($rv > 0) { } |
524
|
0 |
0 |
if $debug |
527
|
0 |
1 |
if $debug |
533
|
0 |
1 |
if $debug |
541
|
0 |
1 |
if $debug |
554
|
0 |
34 |
if ($ip =~ /^(255|127|0)\./) |
561
|
3 |
31 |
if ($flag_intranets and $ip =~ /^10\./) |
565
|
0 |
31 |
if ($flag_intranets and $ip =~ /^172\.(16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)\./) |
569
|
4 |
27 |
if ($flag_intranets and $ip =~ /^192\.168\./) |
574
|
0 |
27 |
if ($flag_intranets and $ip =~ /^fc00\:0\:/i) |
579
|
0 |
27 |
if ($flag_intranets and $ip =~ /^fd00\:0\:/i) |
584
|
0 |
27 |
if ($ip =~ /^169\.254\./) |
589
|
1 |
26 |
if ($ip =~ /^fe80\:0\:/i) |
594
|
0 |
26 |
if ($ip =~ /^(224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239)\./) |
599
|
0 |
26 |
if ($ip =~ /^2[45]\d\./) |
604
|
0 |
26 |
if ($ip =~ /^192\.1[89]\./) |
609
|
0 |
26 |
if ($ip =~ /^192\.0\.2\./) |
620
|
25 |
12 |
if ($int) { } |
633
|
0 |
3 |
unless $email |
635
|
0 |
3 |
if $debug |
645
|
0 |
3 |
if $debug |
650
|
0 |
3 |
if ($rv < 1) |
657
|
0 |
3 |
if ($rv < 1) |
677
|
0 |
11 |
if ($email =~ /\.\./) |
682
|
0 |
11 |
if (length $email > 254) |
687
|
0 |
11 |
if ($email =~ /\.$/) |
691
|
8 |
3 |
if ($email =~ m[^(.*)\@[-()/!#$%&*+~_A-Za-z0-9\.]+\.[-()/!#$%&*+~_A-Za-z0-9\.]+$]) |
696
|
2 |
6 |
if (length $local > 64) |
702
|
0 |
6 |
if ($local =~ /^\./ or $local =~ /\.$/g) |
711
|
1 |
5 |
if ($local =~ /"/) |
712
|
0 |
1 |
if ($local =~ /^".*"$/) |
718
|
1 |
0 |
if ($local =~ /"/) { } |
726
|
5 |
0 |
if ($local =~ m[^[\@'-`/!\?=#\$\%&*+~_A-Za-z0-9\.{}|]+$]) { } |
755
|
0 |
38 |
if $params{'debug'} |
757
|
1 |
37 |
wantarray ? : |
766
|
0 |
0 |
if ($query) { } |
779
|
0 |
0 |
unless ($query) |
785
|
0 |
0 |
unless $result->type eq "TXT" |
788
|
0 |
0 |
if ($spf_line =~ /^v=spf[12]/i) |
796
|
0 |
0 |
if $clause =~ /^[-~]/ |
797
|
0 |
0 |
if ($clause =~ /^.?all/) |
805
|
0 |
0 |
if ($found_spf == 0) { } |
|
0 |
0 |
elsif ($found_spf > 1) { } |