On 12/14/2012 05:01 PM, mouss wrote:
# postconf -d
shows default settings (builtin defaults).
# postconf -n
shows "local" settings.
that said, some "local" settings may use the same value as the default
config, which is mostly useless. on the url you posted, an example is
inet_interfaces = all, since this is the default:
# postconf -d inet_interfaces
inet_interfaces = all
so the setting is useless and can be removed from main.cf. same for
mydestination, alias_maps...
You can chase these with something like:
# postconf -n | while read parameter equal value; do
default_value=`postconf -d $parameter 2>&1`;
if [ "$value" = "$default_value" ]; then
echo "NOTICE: Useless setting: $parameter = $value";
fi;
done
Such settings can be removed from main.cf.
(the "2>&1" will avoid "false positives" when a parameter is "unknown"
to 'postconf -d'...).
I have been running this against the base Centos 6 install that has a
main.cf with lots of comments and a few parameter lines.
postconf -n shows about 20 parameters, and when I compare these against
postconf -d only 9 of them are different.
parameters like mailq_path is now /usr/bin/mailq.postfix and the default
is /usr/bin/mailq
I look at the script and I am not able to tell what is wrong; can you
help me get it right? I think this is a real useful tool.