Le 14/12/2012 01:55, Robert Moskowitz a écrit :
>
> On 12/13/2012 05:47 PM, Noel Jones wrote:
>> On 12/13/2012 4:17 PM, Robert Moskowitz wrote:
>>> In the totorial:
>>>
>>> http://www.campworld.net/thewiki/pmwiki.php/LinuxServersCentOS/Cent6VirtMailServer
>>>
>>>
>>>
>>> There are modified postfix .cf files.  I don't want to just use a
>>> modified postfix file, I want to user postconf to do the
>>> modifications.  And I am not experienced using things like diff to
>>> work out what changes were made from the base install files.
>>>
>>> Can anyone lend some expertise in identifying the mods so I can work
>>> this up as postconf commands?
>> Why?  If you're just going to paste in changes it doesn't matter too
>> much if you paste in a pre-made .cf file or if you run a bunch of
>> postconf commands.
>
> For the past 3 years I have been running with a setup based on:
>
> http://www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-fedora-14-x86_64
>
>
> Here the postfix changes are done via postconf, so I CAN tell what
> changes are made and understand what is going on.
>

# 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'...).



>>
>> Better to learn why each line is there, and why.  And most
>> important, if *you* need it.
>
> Kind of my point.  What changes is the author of the tutorial really
> making so I can understand why.
>
>>
>> http://www.postfix.org/documentation.html
>> http://www.postfix.org/STANDARD_CONFIGURATION_README.html
>> http://www.postfix.org/VIRTUAL_README.html
>>
>> main.cf parameters and their defaults are documented here:
>> http://www.postfix.org/postconf.5.html
>> Generally, only parameters that differ from their default should be
>> included in your main.cf.
>
> Again, what I want to get to.  Understand what changes the author made
> to the defaults.  Looks like I will first have to learn how to
> understand the output of diff.
>
>

do not blindly follow howotos/utorials/etc. better learn from the
official documentation. see Noel's postf for a few URLs. more on postfix
site.

you can also consider getting a copy of "the book of postfix".


Reply via email to