commit
40783dbe87
@ -6,8 +6,6 @@ use vars qw($TraceLevel $Spool_dir $Size_threshold);
|
|||||||
use Sys::Hostname;
|
use Sys::Hostname;
|
||||||
use Qpsmtpd::Constants;
|
use Qpsmtpd::Constants;
|
||||||
|
|
||||||
#use DashProfiler;
|
|
||||||
|
|
||||||
our $VERSION = "0.94";
|
our $VERSION = "0.94";
|
||||||
|
|
||||||
my $git;
|
my $git;
|
||||||
@ -26,8 +24,6 @@ my %defaults = (
|
|||||||
my $_config_cache = {};
|
my $_config_cache = {};
|
||||||
our %config_dir_memo;
|
our %config_dir_memo;
|
||||||
|
|
||||||
#DashProfiler->add_profile("qpsmtpd");
|
|
||||||
#my $SAMPLER = DashProfiler->prepare("qpsmtpd");
|
|
||||||
our $LOGGING_LOADED = 0;
|
our $LOGGING_LOADED = 0;
|
||||||
|
|
||||||
sub _restart {
|
sub _restart {
|
||||||
@ -46,11 +42,6 @@ sub _restart {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub DESTROY {
|
|
||||||
|
|
||||||
#warn $_ for DashProfiler->profile_as_text("qpsmtpd");
|
|
||||||
}
|
|
||||||
|
|
||||||
sub version { $VERSION . ($git ? "/$git" : "") }
|
sub version { $VERSION . ($git ? "/$git" : "") }
|
||||||
|
|
||||||
sub TRACE_LEVEL { $TraceLevel }; # leave for plugin compatibility
|
sub TRACE_LEVEL { $TraceLevel }; # leave for plugin compatibility
|
||||||
@ -268,14 +259,14 @@ sub _config_from_file {
|
|||||||
$visited ||= [];
|
$visited ||= [];
|
||||||
push @{$visited}, $configfile;
|
push @{$visited}, $configfile;
|
||||||
|
|
||||||
open CF, "<$configfile"
|
open my $CF, '<', $configfile
|
||||||
or warn "$$ could not open configfile $configfile: $!" and return;
|
or warn "$$ could not open configfile $configfile: $!" and return;
|
||||||
my @config = <CF>;
|
my @config = <$CF>;
|
||||||
chomp @config;
|
chomp @config;
|
||||||
@config = grep { length($_) and $_ !~ m/^\s*#/ and $_ =~ m/\S/ }
|
@config = grep { length($_) and $_ !~ m/^\s*#/ and $_ =~ m/\S/ }
|
||||||
map { s/^\s+//; s/\s+$//; $_; } # trim leading/trailing whitespace
|
map { s/^\s+//; s/\s+$//; $_; } # trim leading/trailing whitespace
|
||||||
@config;
|
@config;
|
||||||
close CF;
|
close $CF;
|
||||||
|
|
||||||
my $pos = 0;
|
my $pos = 0;
|
||||||
while ($pos < @config) {
|
while ($pos < @config) {
|
||||||
|
Loading…
Reference in New Issue
Block a user