line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::ListDetector::Detector::CommuniGatePro; |
2
|
|
|
|
|
|
|
|
3
|
39
|
|
|
39
|
|
236
|
use strict; |
|
39
|
|
|
|
|
81
|
|
|
39
|
|
|
|
|
1379
|
|
4
|
39
|
|
|
39
|
|
212
|
use warnings; |
|
39
|
|
|
|
|
130
|
|
|
39
|
|
|
|
|
1219
|
|
5
|
|
|
|
|
|
|
|
6
|
39
|
|
|
39
|
|
212
|
use vars qw($VERSION); |
|
39
|
|
|
|
|
81
|
|
|
39
|
|
|
|
|
2429
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.02'; |
8
|
|
|
|
|
|
|
|
9
|
39
|
|
|
39
|
|
255
|
use base qw(Mail::ListDetector::Detector::Base); |
|
39
|
|
|
|
|
108
|
|
|
39
|
|
|
|
|
3618
|
|
10
|
39
|
|
|
39
|
|
232
|
use Mail::ListDetector::List; |
|
39
|
|
|
|
|
120
|
|
|
39
|
|
|
|
|
1050
|
|
11
|
39
|
|
|
39
|
|
29258
|
use Mail::ListDetector::Detector::RFC2919; |
|
39
|
|
|
|
|
106
|
|
|
39
|
|
|
|
|
1289
|
|
12
|
39
|
|
|
39
|
|
252
|
use Carp; |
|
39
|
|
|
|
|
100
|
|
|
39
|
|
|
|
|
4715
|
|
13
|
|
|
|
|
|
|
|
14
|
37
|
|
|
37
|
0
|
154
|
sub DEBUG { 0 } |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub match { |
17
|
37
|
|
|
37
|
1
|
94
|
my $self = shift; |
18
|
37
|
|
|
|
|
87
|
my $message = shift; |
19
|
37
|
50
|
|
|
|
177
|
print "Got message $message\n" if DEBUG; |
20
|
37
|
50
|
|
|
|
181
|
carp ("Mail::ListDetector::Detector::CommuniGatePro - no message supplied") unless defined($message); |
21
|
39
|
|
|
39
|
|
223
|
use Email::Abstract; |
|
39
|
|
|
|
|
70
|
|
|
39
|
|
|
|
|
8474
|
|
22
|
|
|
|
|
|
|
|
23
|
37
|
|
|
|
|
207
|
my $x_listserver = Email::Abstract->get_header($message, 'X-Listserver'); |
24
|
37
|
100
|
100
|
|
|
2581
|
if (defined($x_listserver) && ($x_listserver =~ m/CommuniGate Pro LIST/)) { |
25
|
2
|
|
|
|
|
4
|
chomp $x_listserver; |
26
|
|
|
|
|
|
|
|
27
|
2
|
|
|
|
|
10
|
my $sender = Email::Abstract->get_header($message, 'Sender'); |
28
|
2
|
50
|
|
|
|
133
|
return undef unless defined($sender); |
29
|
2
|
50
|
|
|
|
14
|
$sender =~ m/<(.+)>/ or return undef; |
30
|
2
|
|
|
|
|
8
|
my $posting_address = $1; |
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
|
|
21
|
my $rfc2919 = new Mail::ListDetector::Detector::RFC2919; |
33
|
2
|
|
33
|
|
|
15
|
my $list = ( $rfc2919->match($message) or new Mail::ListDetector::List ); |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
7
|
$list->listsoftware($x_listserver); |
36
|
2
|
|
|
|
|
9
|
$list->posting_address($posting_address); |
37
|
|
|
|
|
|
|
|
38
|
2
|
|
|
|
|
21
|
return $list; |
39
|
|
|
|
|
|
|
} else { |
40
|
35
|
|
|
|
|
419
|
return undef; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |