| 1 | package Sisimai::Rhost::IUA; | ||||||||||||||||||||
| 2 | 6 | ▶ | use v5.26; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 6 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 6 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 16 | ▶ | sub find { | ||||||||||||||||||
|
Subroutine
find: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 7 | # Detect bounce reason from https://www.i.ua/ | ||||||||||||||||||||
| 8 | # @param [Sisimai::Fact] argvs Decoded email object | ||||||||||||||||||||
| 9 | # @return [String] The bounce reason at https://www.i.ua/ | ||||||||||||||||||||
| 10 | # @since v4.25.0 | ||||||||||||||||||||
| 11 | 16 | my $class = shift; | |||||||||||||||||||
| 12 | 16 | ▶ | my $argvs = shift // return ""; return "" unless $argvs->{'diagnosticcode'}; | ||||||||||||||||||
|
Branch: 1 branch
Condition100%2/2
shift() // (return "")
MC/DC100%1/1
shift() // (return "")
shift()
Truth table100%2/2
A
A= shift()
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 14 | require Sisimai::Eb; | |||||||||||||||||||
| 15 | 14 | state $errorcodes = { | |||||||||||||||||||
| 16 | # https://mail.i.ua/err/$(CODE) | ||||||||||||||||||||
| 17 | '1' => $Sisimai::Eb::RePASS, # The use of SMTP as mail gate is forbidden. | ||||||||||||||||||||
| 18 | '2' => $Sisimai::Eb::ReUSER, # User is not found. | ||||||||||||||||||||
| 19 | '3' => $Sisimai::Eb::ReQUIT, # Mailbox was not used for more than 3 months | ||||||||||||||||||||
| 20 | '4' => $Sisimai::Eb::ReFULL, # Mailbox is full. | ||||||||||||||||||||
| 21 | '5' => $Sisimai::Eb::ReRATE, # Letter sending limit is exceeded. | ||||||||||||||||||||
| 22 | '6' => $Sisimai::Eb::RePASS, # Use SMTP of your provider to send mail. | ||||||||||||||||||||
| 23 | '7' => $Sisimai::Eb::ReBLOC, # Wrong value if command HELO/EHLO parameter. | ||||||||||||||||||||
| 24 | '8' => $Sisimai::Eb::ReFROM, # Couldn't check sender address. | ||||||||||||||||||||
| 25 | '9' => $Sisimai::Eb::ReBLOC, # IP-address of the sender is blacklisted. | ||||||||||||||||||||
| 26 | '10' => $Sisimai::Eb::ReFILT, # Not in the list Mail address management. | ||||||||||||||||||||
| 27 | }; | ||||||||||||||||||||
| 28 | 14 | my $issuedcode = lc $argvs->{'diagnosticcode'}; | |||||||||||||||||||
| 29 | 14 | ▶ | my $codenumber = index($issuedcode, '.i.ua/err/') > 0 ? substr($issuedcode, index($issuedcode, '/err/') + 5, 2) : 0; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 30 | 14 | ▶ | $codenumber = substr($codenumber, 0, 1) if index($codenumber, '/') == 1; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 31 | 14 | ▶ | return $errorcodes->{ $codenumber } || ''; | ||||||||||||||||||
|
Condition100%2/2
$errorcodes->{$codenumber} || ''
MC/DC100%1/1
$errorcodes->{$codenumber} || ''
$errorcodes->{$codenumber}
Truth table100%2/2
A
A= $errorcodes->{$codenumber}
| |||||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 6 | 1; | |||||||||||||||||||
| 35 | __END__ | ||||||||||||||||||||