Sisimai/Reason/MailboxFull.pm

filter: Statementstmt 100% 29 / 29 Branchbran 100% 10 / 10 Conditioncond 100% 6 / 6 MC/DCmcdc 100% 3 / 3 Subroutinesub 100% 8 / 8 Podpod 50.0% 2 / 4 totaltotal 96.6% 58 / 60 CC 9 SCAR 12.9
CC
9
Cov
100%
true
6.0
match
4.0
BEGIN
1.0
CRAP 3.6
« Sisimai/Reason/NoRelaying.pm ↑ Summary Sisimai/Reason/OnHold.pm »
1 package Sisimai::Reason::MailboxFull;
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 223 ▶sub text { $Sisimai::Eb::ReFULL }
Subroutine text: called CC=1 SCAR=0.0
Pod documented
8 4 ▶sub description { "Email rejected due to a recipient's mailbox is full" }
Subroutine description: called CC=1 SCAR=0.0
Pod undocumented
9 2934 ▶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 2934 my $class = shift;
16 2934 ▶ my $argv1 = shift // return 0;
Condition100%2/2
shift() // (return 0)
l!l
29331
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
17  
18 2933 state $index = [
19 "452 insufficient disk space",
20 "account disabled temporarly for exceeding receiving limits",
21 "boite du destinataire pleine",
22 "exceeded storage allocation",
23 "full mailbox",
24 "mailbox exceeds allowed size",
25 "mailbox size limit exceeded",
26 "mailbox would exceed maximum allowed storage",
27 "mailfolder is full",
28 "no space left on device",
29 "not sufficient disk space",
30 "quota violation for",
31 "too much mail data", # @docomo.ne.jp
32 "user has exceeded quota, bouncing mail",
33 "user has too many messages on the server",
34 "user's space has been used up",
35 ];
36 2933 state $pairs = [
37 ["account is ", " quota"],
38 ["disk", "quota"],
39 ["enough ", " space"],
40 ["mailbox ", "exceeded", " limit"],
41 ["mailbox ", "full"], # Exim/transports/appendfile.c:2567
42 ["mailbox ", "quota"],
43 ["maildir ", "quota"],
44 ["over ", "quota"],
45 ["quota ", "exceeded"], # Exim/transports/appendfile.c:3050
46 ];
47 2933 ▶ return 1 if grep { rindex($argv1, $_) > -1 } @$index;
Branch: 1 branch
BranchTrueFalseTotal
if grep {rindex($argv1, $_) != -1;} @$index 12 2921 2933
48 2921 ▶ return 1 if grep { Sisimai::String->aligned(\$argv1, $_) } @$pairs;
Branch: 1 branch
BranchTrueFalseTotal
if grep {"Sisimai::String"->aligned(\$argv1, $_);} @$pairs 88 2833 2921
49 2833 return 0;
50 }
51  
52 2432 ▶sub true {
Subroutine true: called CC=6 SCAR=17.9
Pod undocumented
53 # The envelope recipient's mailbox is full or not
54 # @param [Sisimai::Fact] argvs Object to be detected the reason
55 # @return [Integer] 1: is mailbox full
56 # 0: is not mailbox full
57 # @since v4.0.0
58 # @see http://www.ietf.org/rfc/rfc2822.txt
59 2432 my $class = shift;
60 2432 ▶ my $argvs = shift // return 0; return 0 unless $argvs->{'deliverystatus'};
Branch: 1 branch
BranchTrueFalseTotal
unless $argvs->{"deliverystatus"} 553 1878 2431
Condition100%2/2
shift() // (return 0)
l!l
24311
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
61  
62 # Delivery status code points "MailboxFull".
63 # Status: 4.2.2
64 # Diagnostic-Code: SMTP; 450 4.2.2 <***@example.jp>... Mailbox Full
65 1878 ▶ return 1 if $argvs->{'reason'} eq $Sisimai::Eb::ReFULL;
Branch: 1 branch
BranchTrueFalseTotal
if $argvs->{"reason"} eq $Sisimai::Eb::ReFULL 1 1877 1878
66 1877 ▶ return 1 if (Sisimai::SMTP::Status->name($argvs->{'deliverystatus'}) || '') eq $Sisimai::Eb::ReFULL;
Branch: 1 branch
BranchTrueFalseTotal
if ("Sisimai::SMTP::Status"->name($argvs->{"deliverystatus"}) || "") eq $Sisimai::Eb::ReFULL 196 1681 1877
Condition100%2/2
'Sisimai::SMTP::Status'->name($argvs->{'deliverystatus'}) || ''
l!l
1526351
MC/DC100%1/1
'Sisimai::SMTP::Status'->name($argvs->{'deliverystatus'}) || ''
'Sisimai::SMTP::Status'->name($argvs->{'deliverystatus'})
Truth table100%2/2
A
A= 'Sisimai::SMTP::Status'->name($argvs->{'deliverystatus'})
Aresult
11
00
67 1681 return __PACKAGE__->match(lc $argvs->{'diagnosticcode'});
68 }
69  
70 69 1;
71 __END__
« Sisimai/Reason/NoRelaying.pm ↑ Summary Sisimai/Reason/OnHold.pm »