| 1 | package Sisimai::Reason::BadReputation; | ||||||||||||
| 2 | 49 | ▶ | use v5.26; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 49 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 49 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 49 | ▶ | use Sisimai::Eb; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 11 | ▶ | sub text { $Sisimai::Eb::ReFAMA } | ||||||||||
|
Subroutine
text: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 8 | 4 | ▶ | sub description { 'Email rejected due to an IP address reputation' } | ||||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 9 | 1054 | ▶ | sub match { | ||||||||||
|
Subroutine
match: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||
| 10 | # Try to match that the given text and regular expressions | ||||||||||||
| 11 | # @param [String] argv1 String to be matched with regular expressions | ||||||||||||
| 12 | # @return [Integer] 0: Did not match | ||||||||||||
| 13 | # 1: Matched | ||||||||||||
| 14 | # @since v5.0.0 | ||||||||||||
| 15 | 1054 | my $class = shift; | |||||||||||
| 16 | 1054 | ▶ | my $argv1 = shift // return 0; | ||||||||||
|
Condition100%2/2
shift() // (return 0)
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
| |||||||||||||
| 17 | |||||||||||||
| 18 | 1053 | state $index = [ | |||||||||||
| 19 | "has been temporarily rate limited due to ip reputation", | ||||||||||||
| 20 | "ip/domain reputation problems", | ||||||||||||
| 21 | "likely suspicious due to the very low reputation", | ||||||||||||
| 22 | "none/bad reputation", # t-online.de | ||||||||||||
| 23 | "poor email reputation score", | ||||||||||||
| 24 | "sending mta's poor reputation", | ||||||||||||
| 25 | "temporarily deferred due to unexpected volume or user complaints", # Yahoo Inc. | ||||||||||||
| 26 | ]; | ||||||||||||
| 27 | 1053 | ▶ | return 1 if grep { rindex($argv1, $_) > -1 } @$index; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 28 | 1039 | return 0; | |||||||||||
| 29 | } | ||||||||||||
| 30 | |||||||||||||
| 31 | 1052 | ▶ | sub true { | ||||||||||
|
Subroutine
true: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||
| 32 | # The bounce reason is "BadReputation" or not | ||||||||||||
| 33 | # @param [Sisimai::Fact] argvs Object to be detected the reason | ||||||||||||
| 34 | # @return [Integer] 1: is BadReputation | ||||||||||||
| 35 | # 0: is not BadReputation | ||||||||||||
| 36 | # @see http://www.ietf.org/rfc/rfc2822.txt | ||||||||||||
| 37 | # @since v5.0.0 | ||||||||||||
| 38 | 1052 | my $class = shift; | |||||||||||
| 39 | 1052 | ▶ | my $argvs = shift // return 0; | ||||||||||
|
Condition100%2/2
shift() // (return 0)
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
| |||||||||||||
| 40 | |||||||||||||
| 41 | 1051 | ▶ | return 1 if $argvs->{'reason'} eq $Sisimai::Eb::ReFAMA; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 42 | 1050 | return __PACKAGE__->match(lc $argvs->{'diagnosticcode'}); | |||||||||||
| 43 | } | ||||||||||||
| 44 | |||||||||||||
| 45 | 49 | 1; | |||||||||||
| 46 | __END__ | ||||||||||||