line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::ListDetector::Detector::CommuniGate; |
2
|
|
|
|
|
|
|
|
3
|
39
|
|
|
39
|
|
227
|
use strict; |
|
39
|
|
|
|
|
73
|
|
|
39
|
|
|
|
|
1345
|
|
4
|
39
|
|
|
39
|
|
225
|
use warnings; |
|
39
|
|
|
|
|
72
|
|
|
39
|
|
|
|
|
1114
|
|
5
|
|
|
|
|
|
|
|
6
|
39
|
|
|
39
|
|
201
|
use vars qw($VERSION); |
|
39
|
|
|
|
|
74
|
|
|
39
|
|
|
|
|
1735
|
|
7
|
39
|
|
|
39
|
|
242
|
use Email::Abstract; |
|
39
|
|
|
|
|
97
|
|
|
39
|
|
|
|
|
1817
|
|
8
|
|
|
|
|
|
|
$VERSION = '0.01'; |
9
|
|
|
|
|
|
|
|
10
|
39
|
|
|
39
|
|
218
|
use base qw(Mail::ListDetector::Detector::Base); |
|
39
|
|
|
|
|
110
|
|
|
39
|
|
|
|
|
3156
|
|
11
|
39
|
|
|
39
|
|
341
|
use Mail::ListDetector::List; |
|
39
|
|
|
|
|
165
|
|
|
39
|
|
|
|
|
988
|
|
12
|
39
|
|
|
39
|
|
204
|
use Carp; |
|
39
|
|
|
|
|
90
|
|
|
39
|
|
|
|
|
13910
|
|
13
|
|
|
|
|
|
|
|
14
|
18
|
|
|
18
|
0
|
73
|
sub DEBUG { 0 } |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub match { |
17
|
18
|
|
|
18
|
1
|
39
|
my $self = shift; |
18
|
18
|
|
|
|
|
66
|
my $message = shift; |
19
|
18
|
50
|
|
|
|
77
|
print "Got message $message\n" if DEBUG; |
20
|
18
|
50
|
|
|
|
69
|
carp ("Mail::ListDetector::Detector::CommuniGate - no message supplied") unless defined($message); |
21
|
|
|
|
|
|
|
|
22
|
18
|
|
|
|
|
92
|
my $x_listserver = Email::Abstract->get_header($message, 'X-Listserver'); |
23
|
18
|
100
|
66
|
|
|
1162
|
if (defined($x_listserver) && ($x_listserver =~ m/CommuniGate List/)) { |
24
|
1
|
|
|
|
|
4
|
chomp $x_listserver; |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
5
|
my $sender = Email::Abstract->get_header($message, 'Sender'); |
27
|
1
|
50
|
|
|
|
66
|
return undef unless defined($sender); |
28
|
1
|
50
|
|
|
|
7
|
$sender =~ m/([^\s]+@[^\s]+)\s+\((.*)\)/ or return undef; |
29
|
1
|
|
|
|
|
3
|
my $posting_address = $1; |
30
|
1
|
|
|
|
|
3
|
my $listname = $2; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
8
|
my $list = new Mail::ListDetector::List; |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
5
|
$list->listsoftware($x_listserver); |
35
|
1
|
|
|
|
|
5
|
$list->posting_address($posting_address); |
36
|
1
|
|
|
|
|
11
|
$list->listname($listname); |
37
|
|
|
|
|
|
|
|
38
|
1
|
|
|
|
|
4
|
return $list; |
39
|
|
|
|
|
|
|
} else { |
40
|
17
|
|
|
|
|
210
|
return undef; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |