| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Sisimai::Reason::EmailTooLarge; |
|
2
|
69
|
|
|
69
|
|
1604
|
use v5.26; |
|
|
69
|
|
|
|
|
194
|
|
|
3
|
69
|
|
|
69
|
|
419
|
use strict; |
|
|
69
|
|
|
|
|
105
|
|
|
|
69
|
|
|
|
|
1507
|
|
|
4
|
69
|
|
|
69
|
|
212
|
use warnings; |
|
|
69
|
|
|
|
|
84
|
|
|
|
69
|
|
|
|
|
20340
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
74
|
|
|
74
|
1
|
1040
|
sub text { 'emailtoolarge' } |
|
7
|
4
|
|
|
4
|
0
|
17
|
sub description { 'Email rejected due to an email size is too big for a destination mail server' } |
|
8
|
|
|
|
|
|
|
sub match { |
|
9
|
|
|
|
|
|
|
# Try to match that the given text and regular expressions |
|
10
|
|
|
|
|
|
|
# @param [String] argv1 String to be matched with regular expressions |
|
11
|
|
|
|
|
|
|
# @return [Integer] 0: Did not match |
|
12
|
|
|
|
|
|
|
# 1: Matched |
|
13
|
|
|
|
|
|
|
# @since v4.0.0 |
|
14
|
2332
|
|
|
2332
|
1
|
4688
|
my $class = shift; |
|
15
|
2332
|
|
100
|
|
|
4250
|
my $argv1 = shift // return 0; |
|
16
|
|
|
|
|
|
|
|
|
17
|
2331
|
|
|
|
|
2698
|
state $index = [ |
|
18
|
|
|
|
|
|
|
"exceeds the maximum size ", |
|
19
|
|
|
|
|
|
|
"line limit exceeded", |
|
20
|
|
|
|
|
|
|
"message too large", |
|
21
|
|
|
|
|
|
|
"size limit", |
|
22
|
|
|
|
|
|
|
"taille limite du message atteinte", |
|
23
|
|
|
|
|
|
|
]; |
|
24
|
2331
|
|
|
|
|
2587
|
state $pairs = [ |
|
25
|
|
|
|
|
|
|
["exceeded", "message size"], |
|
26
|
|
|
|
|
|
|
["message ", "exceeds ", "limit"], |
|
27
|
|
|
|
|
|
|
["message ", "size", "exceed"], |
|
28
|
|
|
|
|
|
|
["message ", "too", "big"], |
|
29
|
|
|
|
|
|
|
]; |
|
30
|
2331
|
100
|
|
|
|
3799
|
return 1 if grep { rindex($argv1, $_) > -1 } @$index; |
|
|
11655
|
|
|
|
|
18713
|
|
|
31
|
2318
|
100
|
|
|
|
3206
|
return 1 if grep { Sisimai::String->aligned(\$argv1, $_) } @$pairs; |
|
|
9272
|
|
|
|
|
15101
|
|
|
32
|
2316
|
|
|
|
|
6476
|
return 0; |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub true { |
|
36
|
|
|
|
|
|
|
# The message size is too big for the remote host |
|
37
|
|
|
|
|
|
|
# @param [Sisimai::Fact] argvs Object to be detected the reason |
|
38
|
|
|
|
|
|
|
# @return [Integer] 1: is too big message size |
|
39
|
|
|
|
|
|
|
# 0: is not big |
|
40
|
|
|
|
|
|
|
# @since v4.0.0 |
|
41
|
|
|
|
|
|
|
# @see http://www.ietf.org/rfc/rfc2822.txt |
|
42
|
2220
|
|
|
2220
|
0
|
3089
|
my $class = shift; |
|
43
|
2220
|
100
|
100
|
|
|
5221
|
my $argvs = shift // return 0; return 1 if $argvs->{'reason'} eq 'emailtoolarge'; |
|
|
2219
|
|
|
|
|
4671
|
|
|
44
|
|
|
|
|
|
|
|
|
45
|
2218
|
|
50
|
|
|
5352
|
my $statuscode = $argvs->{'deliverystatus'} // ''; |
|
46
|
2218
|
|
100
|
|
|
5302
|
my $tempreason = Sisimai::SMTP::Status->name($statuscode) || ''; |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# Delivery status code points "emailtoolarge". |
|
49
|
|
|
|
|
|
|
# Status: 5.3.4 |
|
50
|
|
|
|
|
|
|
# Diagnostic-Code: SMTP; 552 5.3.4 Error: message file too big |
|
51
|
|
|
|
|
|
|
# |
|
52
|
|
|
|
|
|
|
# Status: 5.2.3 |
|
53
|
|
|
|
|
|
|
# Diagnostic-Code: Message length exceeds administrative limit |
|
54
|
2218
|
100
|
|
|
|
4320
|
return 1 if $tempreason eq 'emailtoolarge'; |
|
55
|
2158
|
|
|
|
|
7719
|
return __PACKAGE__->match(lc $argvs->{'diagnosticcode'}); |
|
56
|
|
|
|
|
|
|
} |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
|
59
|
|
|
|
|
|
|
__END__ |