| 1 | package Sisimai::Reason::FailedSTARTTLS; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 43 | ▶ | use v5.26; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | 43 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 43 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 43 | ▶ | use Sisimai::Eb; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | sub text { $Sisimai::Eb::ReTTLS } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
text: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 4 | ▶ | sub description { "Email delivery failed due to STARTTLS related problem" } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 714 | ▶ | 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.2.0 | ||||||||||||||||||||||||||||||||||||||||||
| 15 | 714 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 16 | 714 | ▶ | 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 | 713 | state $index = [ | |||||||||||||||||||||||||||||||||||||||||
| 19 | "starttls is required to send mail", | ||||||||||||||||||||||||||||||||||||||||||
| 20 | "tls required but not supported", # SendGrid:the recipient mailserver does not support TLS or have a valid certificate | ||||||||||||||||||||||||||||||||||||||||||
| 21 | ]; | ||||||||||||||||||||||||||||||||||||||||||
| 22 | 713 | ▶ | return 1 if grep { rindex($argv1, $_) > -1 } @$index; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 23 | 711 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | 641 | ▶ | sub true { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
true: called CC=8 SCAR=22.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | # The bounce reason is "FailedSTARTTLS" or not | ||||||||||||||||||||||||||||||||||||||||||
| 28 | # @param [Sisimai::Fact] argvs Object to be detected the reason | ||||||||||||||||||||||||||||||||||||||||||
| 29 | # @return [Integer] 1: is FailedSTARTTLS | ||||||||||||||||||||||||||||||||||||||||||
| 30 | # 0: is not FailedSTARTTLS | ||||||||||||||||||||||||||||||||||||||||||
| 31 | # @see http://www.ietf.org/rfc/rfc2822.txt | ||||||||||||||||||||||||||||||||||||||||||
| 32 | # @since v5.2.0 | ||||||||||||||||||||||||||||||||||||||||||
| 33 | 641 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 34 | 641 | ▶ | 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()
| |||||||||||||||||||||||||||||||||||||||||||
| 35 | 640 | ▶ | my $reply = $argvs->{'replycode'} || 0; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$argvs->{'replycode'} || 0
MC/DC100%1/1
$argvs->{'replycode'} || 0
$argvs->{'replycode'}
Truth table100%2/2
A
A= $argvs->{'replycode'}
| |||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | 640 | ▶ | return 1 if $argvs->{"reason"} eq $Sisimai::Eb::ReTTLS || $argvs->{"command"} eq "STARTTLS"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$argvs->{"reason"} eq $Sisimai::Eb::ReTTLS or $argvs->{"command"} eq "STARTTLS"
MC/DC50%1/2
$argvs->{"reason"} eq $Sisimai::Eb::ReTTLS or $argvs->{"command"} eq "STARTTLS"
$argvs->{"reason"} eq $Sisimai::Eb::ReTTLS
$argvs->{"command"} eq "STARTTLS"
Truth table66%2/3
A or B
A= $argvs->{"reason"} eq $Sisimai::Eb::ReTTLSB= $argvs->{"command"} eq "STARTTLS"
| |||||||||||||||||||||||||||||||||||||||||||
| 38 | 639 | ▶ | return 1 if $reply == 523 || $reply == 524 || $reply == 538; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
$reply == 523 or $reply == 524 or $reply == 538
$reply == 523 or $reply == 524
MC/DC0%0/3
$reply == 523 or $reply == 524 or $reply == 538
$reply == 523
$reply == 524
$reply == 538
Truth table25%1/4
A or B or C
A= $reply == 523B= $reply == 524C= $reply == 538
| |||||||||||||||||||||||||||||||||||||||||||
| 39 | 639 | return __PACKAGE__->match(lc $argvs->{"diagnosticcode"}); | |||||||||||||||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | 43 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 43 | __END__ | ||||||||||||||||||||||||||||||||||||||||||