line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sisimai::Reason::Expired; |
2
|
22
|
|
|
22
|
|
1942
|
use feature ':5.10'; |
|
22
|
|
|
|
|
45
|
|
|
22
|
|
|
|
|
1494
|
|
3
|
22
|
|
|
22
|
|
115
|
use strict; |
|
22
|
|
|
|
|
43
|
|
|
22
|
|
|
|
|
355
|
|
4
|
22
|
|
|
22
|
|
88
|
use warnings; |
|
22
|
|
|
|
|
37
|
|
|
22
|
|
|
|
|
4266
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
1
|
15
|
sub text { 'expired' } |
7
|
4
|
|
|
4
|
0
|
15
|
sub description { 'Delivery time has expired due to a connection failure' } |
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
|
309
|
|
|
309
|
1
|
609
|
my $class = shift; |
15
|
309
|
|
50
|
|
|
771
|
my $argv1 = shift // return undef; |
16
|
|
|
|
|
|
|
|
17
|
309
|
|
|
|
|
557
|
state $index = [ |
18
|
|
|
|
|
|
|
'connection timed out', |
19
|
|
|
|
|
|
|
'could not find a gateway for', |
20
|
|
|
|
|
|
|
'delivery attempts will continue to be', |
21
|
|
|
|
|
|
|
'delivery time expired', |
22
|
|
|
|
|
|
|
'failed to deliver to domain ', |
23
|
|
|
|
|
|
|
'giving up on', |
24
|
|
|
|
|
|
|
'have been failing for a long time', |
25
|
|
|
|
|
|
|
'has been delayed', |
26
|
|
|
|
|
|
|
'it has not been collected after', |
27
|
|
|
|
|
|
|
'message expired after sitting in queue for', |
28
|
|
|
|
|
|
|
'message expired, connection refulsed', |
29
|
|
|
|
|
|
|
'message timed out', |
30
|
|
|
|
|
|
|
'retry time not reached for any host after a long failure period', |
31
|
|
|
|
|
|
|
'server did not respond', |
32
|
|
|
|
|
|
|
'this message has been in the queue too long', |
33
|
|
|
|
|
|
|
'unable to deliver message after multiple retries', |
34
|
|
|
|
|
|
|
'was not reachable within the allowed queue period', |
35
|
|
|
|
|
|
|
'your message could not be delivered for more than', |
36
|
|
|
|
|
|
|
]; |
37
|
309
|
100
|
|
|
|
621
|
return 1 if grep { rindex($argv1, $_) > -1 } @$index; |
|
5562
|
|
|
|
|
8125
|
|
38
|
238
|
|
|
|
|
578
|
return 0; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub true { |
42
|
|
|
|
|
|
|
# Delivery expired due to connection failure or network error |
43
|
|
|
|
|
|
|
# @param [Sisimai::Data] argvs Object to be detected the reason |
44
|
|
|
|
|
|
|
# @return [Integer] 1: is expired |
45
|
|
|
|
|
|
|
# 0: is not expired |
46
|
|
|
|
|
|
|
# @see http://www.ietf.org/rfc/rfc2822.txt |
47
|
2
|
|
|
2
|
0
|
7
|
return undef; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
__END__ |