line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::POP3; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
365410
|
use strict; |
|
4
|
|
|
|
|
25
|
|
|
4
|
|
|
|
|
134
|
|
4
|
4
|
|
|
4
|
|
728
|
use IO::Socket; |
|
4
|
|
|
|
|
20682
|
|
|
4
|
|
|
|
|
26
|
|
5
|
4
|
|
|
4
|
|
2602
|
use IO::File; |
|
4
|
|
|
|
|
3339
|
|
|
4
|
|
|
|
|
375
|
|
6
|
4
|
|
|
4
|
|
342
|
use POSIX; |
|
4
|
|
|
|
|
5283
|
|
|
4
|
|
|
|
|
31
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
8179
|
use Mail::POP3::Daemon; # needs to handle signals! |
|
4
|
|
|
|
|
23
|
|
|
4
|
|
|
|
|
124
|
|
9
|
4
|
|
|
4
|
|
1474
|
use Mail::POP3::Server; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
180
|
|
10
|
4
|
|
|
4
|
|
1797
|
use Mail::POP3::Folder::maildir; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
112
|
|
11
|
4
|
|
|
4
|
|
1344
|
use Mail::POP3::Folder::mbox; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
126
|
|
12
|
4
|
|
|
4
|
|
1129
|
use Mail::POP3::Folder::mbox::parse_to_disk; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
105
|
|
13
|
4
|
|
|
4
|
|
1136
|
use Mail::POP3::Security::Connection; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
1467
|
|
14
|
|
|
|
|
|
|
# use Mail::POP3::Security::User; |
15
|
|
|
|
|
|
|
# use Mail::POP3::Security::User::system; |
16
|
|
|
|
|
|
|
# use Mail::POP3::Security::User::vdomain; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# UIDL is the Message-ID |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = "3.09"; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub read_config { |
23
|
2
|
|
|
2
|
1
|
5946
|
my ($class, $config_text) = @_; |
24
|
2
|
|
|
|
|
334
|
my $config = eval $config_text; |
25
|
|
|
|
|
|
|
# mpopd config files have a version number of their own which must |
26
|
|
|
|
|
|
|
# be the same as the Mail::POP3 version. As mpopd develops, new features |
27
|
|
|
|
|
|
|
# may require new config items or syntax so the version number of |
28
|
|
|
|
|
|
|
# the config file must be checked first. |
29
|
2
|
50
|
|
|
|
14
|
die <{mpopd_conf_version} ne $VERSION; |
30
|
|
|
|
|
|
|
Sorry, Mail::POP3 v$VERSION requires an mpopd config file conforming |
31
|
|
|
|
|
|
|
to config version '$VERSION'. |
32
|
|
|
|
|
|
|
Your config file is version '$config->{mpopd_conf_version}' |
33
|
|
|
|
|
|
|
EOF |
34
|
2
|
|
|
|
|
8
|
$config; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub make_sane { |
38
|
0
|
|
|
0
|
1
|
|
my ($class, $config_hash) = @_; |
39
|
|
|
|
|
|
|
# Create a sane environment if not configured in mpop.conf |
40
|
0
|
0
|
|
|
|
|
$config_hash->{port} = 110 if $config_hash->{port} !~ /^\d+$/; |
41
|
|
|
|
|
|
|
$config_hash->{message_start} = "^From " |
42
|
0
|
0
|
|
|
|
|
if $config_hash->{message_start} !~ /^\S+$/; |
43
|
|
|
|
|
|
|
$config_hash->{message_end} = "^\\s*\$" |
44
|
0
|
0
|
|
|
|
|
if $config_hash->{message_end} !~ /^\S+$/; |
45
|
|
|
|
|
|
|
$config_hash->{timeout} = 10 |
46
|
0
|
0
|
|
|
|
|
if $config_hash->{timeout} !~ /^\d+$/; |
47
|
|
|
|
|
|
|
# Make disk-based parsing the default |
48
|
|
|
|
|
|
|
$config_hash->{parse_to_disk} = 1 |
49
|
0
|
0
|
|
|
|
|
unless defined $config_hash->{parse_to_disk}; |
50
|
0
|
|
|
|
|
|
$config_hash->{greeting} =~ s/([\w\.-_:\)\(]{50}).*/$1/; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub from_file { |
54
|
0
|
|
|
0
|
1
|
|
my ($class, $file) = @_; |
55
|
0
|
|
|
|
|
|
local (*FH, $/); |
56
|
0
|
0
|
|
|
|
|
open FH, $file or die "$file: $!\n"; |
57
|
0
|
|
|
|
|
|
; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
__END__ |