Unverified Commit 3392c839 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1061 from racke/pr/fix-invalid-aliases-program-message by racke & ikedas

Skip execution of aliases_program in newaliases script if value is "none"
parents e719dc46 14ed8900
......@@ -479,11 +479,12 @@ our %pinfo = (
context => [qw(domain site)],
order => 4.04,
group => 'mta',
format => 'makemap|newaliases|postalias|postmap|/.+',
format => 'makemap|newaliases|postalias|postmap|/.+|none',
default => 'newaliases',
gettext_id => 'Program used to update alias database',
gettext_comment =>
'This may be "makemap", "newaliases", "postalias", "postmap" or full path to custom program.',
# Option "none" was added on 6.2.61b
},
aliases_wrapper => {
context => [qw(domain site)],
......
......@@ -140,6 +140,9 @@ if ($aliases_program =~ m{\A/}) {
q{--POSTMAP--}, $aliases_db_type, $aliases_file);
exec q{--POSTMAP--}, "$aliases_db_type:$aliases_file";
} elsif ($aliases_program eq 'none') {
$log->syslog('debug2', 'Skipping execution of aliases_program');
exit 0;
} else {
$log->syslog('err', 'Invalid aliases_program "%s"', $aliases_program);
exit 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment