Unknown param is sometimes reported on stderr

This commit is contained in:
Jamie Cameron
2020-06-08 20:34:49 -07:00
parent 3887aedf50
commit 965561793d
2 changed files with 5 additions and 3 deletions

BIN
postfix/images/sni.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

View File

@@ -128,12 +128,14 @@ foreach my $l (@$lref) {
if (!defined($out) && !$_[1]) {
# Fall back to asking Postfix
# -h tells postconf not to output the name of the parameter
$out = &backquote_command("$config{'postfix_config_command'} -c $config_dir -h ".
quotemeta($name)." 2>/dev/null", 1);
my $err;
&execute_command("$config{'postfix_config_command'} -c $config_dir -h ".
quotemeta($name), undef, \$out, \$err, 0, 1);
if ($?) {
&error(&text('query_get_efailed', $name, $out));
}
elsif ($out =~ /warning:.*unknown\s+parameter/) {
elsif ($out =~ /warning:.*unknown\s+parameter/ ||
$err =~ /warning:.*unknown\s+parameter/) {
return undef;
}
chop($out);