On 12/23/2012 8:28 AM, Robert Moskowitz wrote: > > On 12/23/2012 09:20 AM, Noel Jones wrote: >> On 12/23/2012 7:17 AM, Robert Moskowitz wrote: >>>> 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 >>>> >>> 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. >> That sounds about right. A basic postfix install needs only a few >> non-default settings. >> >> >>> parameters like mailq_path is now /usr/bin/mailq.postfix and the >>> default is /usr/bin/mailq >> sounds reasonable. >> >>> 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. >> It's unclear what problem you are having. Please explain. > > When I run the script shown above, there is no output. Yet I know > there are lines in the main.cf that differ from the defaults. That > is there are 9 lines shown in the -n option that are different from > shown in the -d option. I would think that the above script should > have printed those lines. > > I ran the script both as me and as root. >
Postconf commands should be run as root. Google for the postfinger tool. -- Noel Jones