| 1 | package Sisimai::Reason::EmailTooLarge; | ||||||||||||||||||||
| 2 | 69 | ▶ | use v5.26; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 69 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 69 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 69 | ▶ | use Sisimai::Eb; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 74 | ▶ | sub text { $Sisimai::Eb::ReSIZE } | ||||||||||||||||||
|
Subroutine
text: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 8 | 4 | ▶ | sub description { 'Email rejected due to an email size is too big for a destination mail server' } | ||||||||||||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 9 | 2342 | ▶ | sub match { | ||||||||||||||||||
|
Subroutine
match: called CC=4 SCAR=13.9
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 v4.0.0 | ||||||||||||||||||||
| 15 | 2342 | my $class = shift; | |||||||||||||||||||
| 16 | 2342 | ▶ | 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 | 2341 | state $index = [ | |||||||||||||||||||
| 19 | "exceeds the maximum size ", | ||||||||||||||||||||
| 20 | "line limit exceeded", | ||||||||||||||||||||
| 21 | "message too large", | ||||||||||||||||||||
| 22 | "size limit", | ||||||||||||||||||||
| 23 | "taille limite du message atteinte", | ||||||||||||||||||||
| 24 | ]; | ||||||||||||||||||||
| 25 | 2341 | state $pairs = [ | |||||||||||||||||||
| 26 | ["exceeded", "message size"], | ||||||||||||||||||||
| 27 | ["message ", "exceeds ", "limit"], | ||||||||||||||||||||
| 28 | ["message ", "size", "exceed"], | ||||||||||||||||||||
| 29 | ["message ", "too", "big"], | ||||||||||||||||||||
| 30 | ]; | ||||||||||||||||||||
| 31 | 2341 | ▶ | return 1 if grep { rindex($argv1, $_) > -1 } @$index; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 32 | 2328 | ▶ | return 1 if grep { Sisimai::String->aligned(\$argv1, $_) } @$pairs; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 33 | 2322 | return 0; | |||||||||||||||||||
| 34 | } | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | 2226 | ▶ | sub true { | ||||||||||||||||||
|
Subroutine
true: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 37 | # The message size is too big for the remote host | ||||||||||||||||||||
| 38 | # @param [Sisimai::Fact] argvs Object to be detected the reason | ||||||||||||||||||||
| 39 | # @return [Integer] 1: is too big message size | ||||||||||||||||||||
| 40 | # 0: is not big | ||||||||||||||||||||
| 41 | # @since v4.0.0 | ||||||||||||||||||||
| 42 | # @see http://www.ietf.org/rfc/rfc2822.txt | ||||||||||||||||||||
| 43 | 2226 | my $class = shift; | |||||||||||||||||||
| 44 | 2226 | ▶ | my $argvs = shift // return 0; return 1 if $argvs->{'reason'} eq $Sisimai::Eb::ReSIZE; | ||||||||||||||||||
|
Branch: 1 branch
Condition100%2/2
shift() // (return 0)
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
| |||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | 2224 | ▶ | my $statuscode = $argvs->{'deliverystatus'} // ''; | ||||||||||||||||||
|
Condition50%1/2
$argvs->{"deliverystatus"} // ""
MC/DC0%0/1
$argvs->{"deliverystatus"} // ""
$argvs->{"deliverystatus"}
Truth table50%1/2
A
A= $argvs->{"deliverystatus"}
| |||||||||||||||||||||
| 47 | 2224 | ▶ | my $tempreason = Sisimai::SMTP::Status->name($statuscode) || ''; | ||||||||||||||||||
|
Condition100%2/2
'Sisimai::SMTP::Status'->name($statuscode) || ''
MC/DC100%1/1
'Sisimai::SMTP::Status'->name($statuscode) || ''
'Sisimai::SMTP::Status'->name($statuscode)
Truth table100%2/2
A
A= 'Sisimai::SMTP::Status'->name($statuscode)
| |||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | # Delivery status code points "EmailTooLarge". | ||||||||||||||||||||
| 50 | # Status: 5.3.4 | ||||||||||||||||||||
| 51 | # Diagnostic-Code: SMTP; 552 5.3.4 Error: message file too big | ||||||||||||||||||||
| 52 | # | ||||||||||||||||||||
| 53 | # Status: 5.2.3 | ||||||||||||||||||||
| 54 | # Diagnostic-Code: Message length exceeds administrative limit | ||||||||||||||||||||
| 55 | 2224 | ▶ | return 1 if $tempreason eq $Sisimai::Eb::ReSIZE; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 56 | 2164 | return __PACKAGE__->match(lc $argvs->{'diagnosticcode'}); | |||||||||||||||||||
| 57 | } | ||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | 69 | 1; | |||||||||||||||||||
| 60 | __END__ | ||||||||||||||||||||