line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::POP3; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
450158
|
use strict; |
|
4
|
|
|
|
|
28
|
|
|
4
|
|
|
|
|
121
|
|
4
|
4
|
|
|
4
|
|
1016
|
use IO::Socket; |
|
4
|
|
|
|
|
25636
|
|
|
4
|
|
|
|
|
24
|
|
5
|
4
|
|
|
4
|
|
4513
|
use IO::File; |
|
4
|
|
|
|
|
3946
|
|
|
4
|
|
|
|
|
457
|
|
6
|
4
|
|
|
4
|
|
518
|
use POSIX; |
|
4
|
|
|
|
|
6115
|
|
|
4
|
|
|
|
|
34
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
10926
|
use Mail::POP3::Daemon; # needs to handle signals! |
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
128
|
|
9
|
4
|
|
|
4
|
|
1970
|
use Mail::POP3::Server; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
157
|
|
10
|
4
|
|
|
4
|
|
1914
|
use Mail::POP3::Folder::maildir; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
129
|
|
11
|
4
|
|
|
4
|
|
1881
|
use Mail::POP3::Folder::mbox; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
131
|
|
12
|
4
|
|
|
4
|
|
1828
|
use Mail::POP3::Folder::mbox::parse_to_disk; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
131
|
|
13
|
4
|
|
|
4
|
|
1733
|
use Mail::POP3::Security::Connection; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
1731
|
|
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.10"; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub read_config { |
23
|
2
|
|
|
2
|
1
|
5426
|
my ($class, $config_text) = @_; |
24
|
2
|
|
|
|
|
274
|
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__ |