line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sisimai::Reason::Suspend; |
2
|
59
|
|
|
59
|
|
1880
|
use feature ':5.10'; |
|
59
|
|
|
|
|
96
|
|
|
59
|
|
|
|
|
4458
|
|
3
|
59
|
|
|
59
|
|
290
|
use strict; |
|
59
|
|
|
|
|
75
|
|
|
59
|
|
|
|
|
1689
|
|
4
|
59
|
|
|
59
|
|
222
|
use warnings; |
|
59
|
|
|
|
|
778
|
|
|
59
|
|
|
|
|
12872
|
|
5
|
|
|
|
|
|
|
|
6
|
18
|
|
|
18
|
1
|
44
|
sub text { 'suspend' } |
7
|
4
|
|
|
4
|
0
|
11
|
sub description { 'Email rejected due to a recipient account is being suspended' } |
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
|
1865
|
|
|
1865
|
1
|
6133
|
my $class = shift; |
15
|
1865
|
|
50
|
|
|
3415
|
my $argv1 = shift // return undef; |
16
|
|
|
|
|
|
|
|
17
|
1865
|
|
|
|
|
2134
|
state $index = [ |
18
|
|
|
|
|
|
|
' is currently suspended', |
19
|
|
|
|
|
|
|
' temporary locked', |
20
|
|
|
|
|
|
|
'boite du destinataire archivee', |
21
|
|
|
|
|
|
|
'email account that you tried to reach is disabled', |
22
|
|
|
|
|
|
|
'has been suspended', |
23
|
|
|
|
|
|
|
'invalid/inactive user', |
24
|
|
|
|
|
|
|
'is a deactivated mailbox', # http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000742 |
25
|
|
|
|
|
|
|
'mailbox currently suspended', |
26
|
|
|
|
|
|
|
'mailbox is frozen', |
27
|
|
|
|
|
|
|
'mailbox unavailable or access denied', |
28
|
|
|
|
|
|
|
'recipient rejected: temporarily inactive', |
29
|
|
|
|
|
|
|
'recipient suspend the service', |
30
|
|
|
|
|
|
|
'this account has been disabled or discontinued', |
31
|
|
|
|
|
|
|
'this mailbox is disabled', |
32
|
|
|
|
|
|
|
'user suspended', # http://mail.163.com/help/help_spam_16.htm |
33
|
|
|
|
|
|
|
'vdelivermail: account is locked email bounced', |
34
|
|
|
|
|
|
|
]; |
35
|
1865
|
100
|
|
|
|
2992
|
return 1 if grep { rindex($argv1, $_) > -1 } @$index; |
|
29840
|
|
|
|
|
39919
|
|
36
|
1837
|
|
|
|
|
6229
|
return 0; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub true { |
40
|
|
|
|
|
|
|
# The envelope recipient's mailbox is suspended or not |
41
|
|
|
|
|
|
|
# @param [Sisimai::Data] argvs Object to be detected the reason |
42
|
|
|
|
|
|
|
# @return [Integer] 1: is mailbox suspended |
43
|
|
|
|
|
|
|
# 0: is not suspended |
44
|
|
|
|
|
|
|
# @since v4.0.0 |
45
|
|
|
|
|
|
|
# @see http://www.ietf.org/rfc/rfc2822.txt |
46
|
1831
|
|
|
1831
|
0
|
3337
|
my $class = shift; |
47
|
1831
|
|
100
|
|
|
3737
|
my $argvs = shift // return undef; |
48
|
1830
|
100
|
|
|
|
3742
|
return undef unless $argvs->deliverystatus; |
49
|
|
|
|
|
|
|
|
50
|
1435
|
50
|
|
|
|
6469
|
return 1 if $argvs->reason eq 'suspend'; |
51
|
1435
|
100
|
|
|
|
6367
|
return 1 if __PACKAGE__->match(lc $argvs->diagnosticcode); |
52
|
1420
|
|
|
|
|
3158
|
return 0 |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
__END__ |