line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::POP3; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
483776
|
use strict; |
|
4
|
|
|
|
|
23
|
|
|
4
|
|
|
|
|
124
|
|
4
|
4
|
|
|
4
|
|
1039
|
use IO::Socket; |
|
4
|
|
|
|
|
26613
|
|
|
4
|
|
|
|
|
23
|
|
5
|
4
|
|
|
4
|
|
4025
|
use IO::File; |
|
4
|
|
|
|
|
4392
|
|
|
4
|
|
|
|
|
443
|
|
6
|
4
|
|
|
4
|
|
570
|
use POSIX; |
|
4
|
|
|
|
|
6772
|
|
|
4
|
|
|
|
|
35
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
10769
|
use Mail::POP3::Daemon; # needs to handle signals! |
|
4
|
|
|
|
|
20
|
|
|
4
|
|
|
|
|
166
|
|
9
|
4
|
|
|
4
|
|
1942
|
use Mail::POP3::Server; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
145
|
|
10
|
4
|
|
|
4
|
|
1996
|
use Mail::POP3::Folder::maildir; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
137
|
|
11
|
4
|
|
|
4
|
|
2112
|
use Mail::POP3::Folder::mbox; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
134
|
|
12
|
4
|
|
|
4
|
|
1993
|
use Mail::POP3::Folder::mbox::parse_to_disk; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
140
|
|
13
|
4
|
|
|
4
|
|
1842
|
use Mail::POP3::Security::Connection; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
1735
|
|
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.11"; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub read_config { |
23
|
2
|
|
|
2
|
1
|
5590
|
my ($class, $config_text) = @_; |
24
|
2
|
|
|
|
|
290
|
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
|
|
|
|
|
6
|
$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__ |