On 27 Nov 2013, at 19:26 , Wietse Venema <[email protected]> wrote:

> LuKreme:
>> On 27 Nov 2013, at 17:13 , Wietse Venema <[email protected]> wrote:
>>> Examples are at http://www.porcupine.org/postfix-mirror/wip.html
>>> and at the top of the RELEASE_NOTES file. Documentation is also in
>>> the postconf(1) manpage (nroff -man man/man1/postconf.1 | less).
>> 
>> My only comment is that the delineation between -F and -P is going
>> to cause confusion, misconfigurations, and much wailing and gnashing
>> of teeth.
> 
> Specify -F if you want to change a column (chroot) and specify -P
> if you want to change a parameter (smtpd_recipient_restrictions).

Yes, I understand the difference, my point is that other people will be 
confused and that I suspect it is going to be a constant source of 
misconfiguration.

> The alternative is to encode it in the name:

Why? chroot is a field, can't it be parsed correctly?

> You are assuming that -F and -P will be the only name spaces, and
> that one name cannot appear in more than one place. I think that's
> two mistakes.

OK. I couldn't think of any field that collided with a parameter or what other 
name spaces there might be, but I predict it is going to be a issue.

Maybe field/smtp/inet/chroot=n and smtp/inet/mynetworks=127.0.0.1 (because I 
suspect changing the fields is going to be done much less often that 
parameters?)

> But the biggest differences are that 
> 
>    $ postconf -F
> 
> knows that you are mis-typing a field name (where as you proposal
> would think that you specify a parameter name)

That’s' certainly an issue. How many parameters are there that are going to 
take a simple y/n setting though? There's not a single one in my main.cf, 
though there are a couple of single digits.

Also, the Fields are all single words, and almost all the parameters have 
multiple_words_with_underscores, so there might be something there.

myhostname mydomain myorigin mydestination and mynetworks seem to be the only 
parameter labels without an _ on my system, for example. They all conveniently 
start with "my".

> and that
> 
>    $ postconf -P
>    $ postconf -P service
>    $ postconf -P service/type
> 
> lists *only* master.cf (-o name=value) parameters while your
> proposal would also list all the service/name/field settings.

That does seem like a good feature to have.

> What would you do to get only the parameters listed?

Off the top of my head I'd say that -P lists only the parameters by default and 
you'd need to specify a second flag to also list the fields --full or --fields 
or something, perhaps. Again, I think mucking with fields is something that is 
done rather less than mucking with parameters. 

So, maybe it doesn't matter. People will learn to use -P and use that most of 
the time and may never use -F at all and it will be fine. Maybe.


-- 
Real magic is the hand around the bandsaw, the thrown spark in the
powder keg, the dimension-warp linking you straight into the heart of a
star, the flaming sword that burns all the way to the pommel.


Reply via email to