line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::ListDetector::Detector::RFC2369; |
2
|
|
|
|
|
|
|
|
3
|
39
|
|
|
39
|
|
211
|
use strict; |
|
39
|
|
|
|
|
75
|
|
|
39
|
|
|
|
|
1263
|
|
4
|
39
|
|
|
39
|
|
206
|
use warnings; |
|
39
|
|
|
|
|
76
|
|
|
39
|
|
|
|
|
1142
|
|
5
|
39
|
|
|
39
|
|
198
|
use base qw(Mail::ListDetector::Detector::Base); |
|
39
|
|
|
|
|
69
|
|
|
39
|
|
|
|
|
2858
|
|
6
|
39
|
|
|
39
|
|
224
|
use Mail::ListDetector::List; |
|
39
|
|
|
|
|
70
|
|
|
39
|
|
|
|
|
787
|
|
7
|
39
|
|
|
39
|
|
48231
|
use URI; |
|
39
|
|
|
|
|
240480
|
|
|
39
|
|
|
|
|
13916
|
|
8
|
39
|
|
|
39
|
|
545
|
use Carp; |
|
39
|
|
|
|
|
134
|
|
|
39
|
|
|
|
|
6632
|
|
9
|
|
|
|
|
|
|
|
10
|
30
|
|
|
30
|
0
|
132
|
sub DEBUG { 0 } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub match { |
13
|
30
|
|
|
30
|
1
|
89
|
my $self = shift; |
14
|
30
|
|
|
|
|
75
|
my $message = shift; |
15
|
30
|
50
|
|
|
|
156
|
print "Got message $message\n" if DEBUG; |
16
|
30
|
50
|
|
|
|
140
|
carp ("Mail::ListDetector::Detector::RFC2369 - no message supplied") unless defined($message); |
17
|
39
|
|
|
39
|
|
825
|
use Email::Abstract; |
|
39
|
|
|
|
|
320
|
|
|
39
|
|
|
|
|
9978
|
|
18
|
|
|
|
|
|
|
|
19
|
30
|
|
|
|
|
154
|
my $posting_uri = Email::Abstract->get_header($message, 'List-Post'); |
20
|
30
|
100
|
|
|
|
2265
|
return undef unless defined($posting_uri); |
21
|
8
|
|
|
|
|
20
|
chomp $posting_uri; |
22
|
8
|
50
|
|
|
|
312
|
return undef unless $posting_uri =~ m/(<.*>)/; |
23
|
8
|
|
|
|
|
70
|
my $posting_u = new URI($1); |
24
|
8
|
50
|
|
|
|
27881
|
return undef unless defined $posting_u; |
25
|
8
|
50
|
|
|
|
95
|
if ($posting_u->scheme ne 'mailto') { |
26
|
0
|
|
|
|
|
0
|
return undef; |
27
|
|
|
|
|
|
|
} |
28
|
8
|
|
|
|
|
1186
|
my $posting_email = $posting_u->to; |
29
|
8
|
|
|
|
|
1428
|
my $software = 'RFC2369'; |
30
|
8
|
|
|
|
|
10805
|
my ($listname) = ($posting_email =~ /^([^@]+)@/); |
31
|
8
|
|
|
|
|
109
|
my $list = new Mail::ListDetector::List; |
32
|
8
|
|
|
|
|
50
|
$list->listsoftware($software); |
33
|
8
|
|
|
|
|
40
|
$list->posting_address($posting_email); |
34
|
8
|
|
|
|
|
38
|
$list->listname($listname); |
35
|
8
|
|
|
|
|
60
|
return $list; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |