Larry Stone:
> On Wed, 7 Mar 2012, Quanah Gibson-Mount wrote:
> 
> >>> ># postconf -# policy_time_limit
> >>> >
> >>> > After:
> >>> >
> >>> > /etc/postfix/main.cf:
> >>> >   # policy_time_limit = foo
> >>> >   # policy_time_limit = bar
> >>> 
> >>> The problem with this approach is that if you later re-enable the
> >>> policy,  it will not remove the #'d out entries.  Over time, you could
> >>> theoretically  end up with numerous #'d entries for the parameter.
> >
> > This is most definitely not a theoretical scenario.  In fact, it is quite 
> > trivial to produce.  In addition, the postconf -# option is at best a hack. 
> > Even the man page notes there's no "reverse operation", which clearly 
> > illustrates it is at best a hack.
> 
> ...snip...
> 
> An aside in this: why is this so important for you? What's wrong with 
> using a text editor to clean up main.cf? Until this thread came along, I 
> didn't even know you could use postconf to edit main.cf; I've always used 
> a text editor. And I consider that a plus since it lets me add comments 
> and group things in a logical fashion.

Don't worry about it. I just added this:

       -x     Edit  the  main.cf configuration file, and remove the parameters
              given on the postconf(1) command line.  The file is copied to  a
              temporary  file  then  renamed  into  place.   Specify a list of
              parameter names, not name=value pairs.  There is no  postconf(1)
              command to perform the reverse operation.

              This feature is available with Postfix 2.10 and later.

It uses the same code as -#, except it produces no output. And as
with -#, there will be no command to perform the reverse operation.

Feature patch will be on source code mirrors at
postfix-release/experimental/feature-patches/20120307-postconf-x-patch
postfix-release/experimental/feature-patches/20120307-postconf-x-patch.sig

        Wietse

Reply via email to