| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Sisimai::Reason::TooManyConn; |
|
2
|
33
|
|
|
33
|
|
2110
|
use feature ':5.10'; |
|
|
33
|
|
|
|
|
68
|
|
|
|
33
|
|
|
|
|
2368
|
|
|
3
|
33
|
|
|
33
|
|
178
|
use strict; |
|
|
33
|
|
|
|
|
64
|
|
|
|
33
|
|
|
|
|
574
|
|
|
4
|
33
|
|
|
33
|
|
137
|
use warnings; |
|
|
33
|
|
|
|
|
54
|
|
|
|
33
|
|
|
|
|
9203
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
1
|
27
|
sub text { 'toomanyconn' } |
|
7
|
4
|
|
|
4
|
0
|
16
|
sub description { 'SMTP connection rejected temporarily due to too many concurrency connections to the remote host' } |
|
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.1.26 |
|
14
|
766
|
|
|
766
|
1
|
4086
|
my $class = shift; |
|
15
|
766
|
|
50
|
|
|
1706
|
my $argv1 = shift // return undef; |
|
16
|
|
|
|
|
|
|
|
|
17
|
766
|
|
|
|
|
1062
|
state $index = [ |
|
18
|
|
|
|
|
|
|
'all available ips are at maximum connection limit', # SendGrid |
|
19
|
|
|
|
|
|
|
'connection rate limit exceeded', |
|
20
|
|
|
|
|
|
|
'exceeds per-domain connection limit for', |
|
21
|
|
|
|
|
|
|
'has exceeded the max emails per hour ', |
|
22
|
|
|
|
|
|
|
'throttling failure: daily message quota exceeded', |
|
23
|
|
|
|
|
|
|
'throttling failure: maximum sending rate exceeded', |
|
24
|
|
|
|
|
|
|
'too many connections', |
|
25
|
|
|
|
|
|
|
'too many connections from your host.', # Microsoft |
|
26
|
|
|
|
|
|
|
'too many concurrent smtp connections', # Microsoft |
|
27
|
|
|
|
|
|
|
'too many errors from your ip', # Free.fr |
|
28
|
|
|
|
|
|
|
'too many recipients', # ntt docomo |
|
29
|
|
|
|
|
|
|
'too many smtp sessions for this host', # Sendmail(daemon.c) |
|
30
|
|
|
|
|
|
|
'trop de connexions, ', |
|
31
|
|
|
|
|
|
|
'we have already made numerous attempts to deliver this message', |
|
32
|
|
|
|
|
|
|
]; |
|
33
|
766
|
100
|
|
|
|
1674
|
return 1 if grep { rindex($argv1, $_) > -1 } @$index; |
|
|
10724
|
|
|
|
|
17941
|
|
|
34
|
758
|
|
|
|
|
1717
|
return 0; |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub true { |
|
38
|
|
|
|
|
|
|
# Blocked due to that connection rate limit exceeded |
|
39
|
|
|
|
|
|
|
# @param [Sisimai::Data] argvs Object to be detected the reason |
|
40
|
|
|
|
|
|
|
# @return [Integer] 1: Too many connections(blocked) |
|
41
|
|
|
|
|
|
|
# 0: Not many connections |
|
42
|
|
|
|
|
|
|
# @since v4.1.26 |
|
43
|
|
|
|
|
|
|
# @see http://www.ietf.org/rfc/rfc2822.txt |
|
44
|
692
|
|
|
692
|
0
|
1272
|
my $class = shift; |
|
45
|
692
|
|
100
|
|
|
1707
|
my $argvs = shift // return undef; |
|
46
|
|
|
|
|
|
|
|
|
47
|
691
|
50
|
|
|
|
1753
|
return 1 if $argvs->reason eq 'toomanyconn'; |
|
48
|
691
|
50
|
100
|
|
|
4045
|
return 1 if (Sisimai::SMTP::Status->name($argvs->deliverystatus) || '') eq 'toomanyconn'; |
|
49
|
691
|
100
|
|
|
|
1888
|
return 1 if __PACKAGE__->match(lc $argvs->diagnosticcode); |
|
50
|
686
|
|
|
|
|
1877
|
return 0; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
|
54
|
|
|
|
|
|
|
__END__ |