Support multiline environment variables
This commit is contained in:
parent
d2bfbb076a
commit
2efd59c518
@ -150,8 +150,11 @@ sub from_environment {
|
||||
|
||||
my $env_name = "QPSMTPD_" . $config;
|
||||
return unless $ENV{$env_name};
|
||||
my @config;
|
||||
push(@config, $ENV{$env_name});
|
||||
|
||||
my @config = split "\n", $ENV{$env_name};
|
||||
|
||||
chomp @config;
|
||||
for (@config) { s/^\s+//; s/\s+$//; } # trim leading/trailing whitespace
|
||||
|
||||
|
||||
return wantarray ? @config : $config[0];
|
||||
|
Loading…
Reference in New Issue
Block a user