Loading ...
Sorry, an error occurred while loading the content.

Re: Does an option "include" exist?

Expand Messages
  • Christian Rößner
    Hi, ... I wasn t sure if my idea was good or bad. I simply thought about reducing redundancy and therefor lowering the risk of doing mistakes, if changes in
    Message 1 of 6 , Nov 1, 2012
    • 0 Attachment
      Hi,

      >> I have a trivial question: I have several smtpd blocks in my
      >> master.cf. Most of the time with similar options, but maybe just
      >> single options change. Is there some "include" option that I could
      >> cut these options and paste them in a separate file and include it
      >> where needed?
      >
      > Since it is not documented in master(5), it's safe to assume it does
      > not exist. I doubt Wietse is interested in implementing such a
      > feature, but he can of course answer for himself.

      I wasn't sure if "my" idea was good or bad. I simply thought about reducing redundancy and therefor lowering the risk of doing mistakes, if changes in config are required.

      > A workaround which can accomplish the same thing is to create a
      > Makefile and use make(1).

      Yes, that seems a good idea for now. So this would lead in something like a template system, where "make" builds the final master.cf.

      Thanks

      -Christian Rößner

      --
      [*] sys4 AG

      http://sys4.de, +49 (89) 30 90 46 64
      Franziskanerstraße 15, 81669 München

      Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
      Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
      Aufsichtsratsvorsitzender: Joerg Heidrich
    • /dev/rob0
      ... I m not saying it is a bad idea. It might even be something for Wietse to consider if/when work begins on a non-compatible Postfix 3.0 . I think it
      Message 2 of 6 , Nov 2, 2012
      • 0 Attachment
        On Thu, Nov 01, 2012 at 05:56:46PM +0100, Christian Rößner wrote:
        > rob0:
        > >Christian:
        > >> I have a trivial question: I have several smtpd blocks in my
        > >> master.cf. Most of the time with similar options, but maybe just
        > >> single options change. Is there some "include" option that I
        > >> could cut these options and paste them in a separate file and
        > >> include it where needed?
        > >
        > > Since it is not documented in master(5), it's safe to assume it
        > > it does not exist. I doubt Wietse is interested in implementing
        > > such a feature, but he can of course answer for himself.
        >
        > I wasn't sure if "my" idea was good or bad. I simply thought
        > about reducing redundancy and therefor lowering the risk of
        > doing mistakes, if changes in config are required.

        I'm not saying it is a "bad" idea. It might even be something for
        Wietse to consider if/when work begins on a non-compatible Postfix
        "3.0". I think it would be difficult to ensure downgradability with
        such a feature.

        > > A workaround which can accomplish the same thing is to create
        > > a Makefile and use make(1).
        >
        > Yes, that seems a good idea for now. So this would lead in
        > something like a template system, where "make" builds the
        > final master.cf.

        And this fits in with the general Unix philosophy of small tools
        which do one job well and can work together to do big jobs. It's
        upgrade- and downgrade-resistant, also.
        --
        http://rob0.nodns4.us/ -- system administration and consulting
        Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
      • Ralf Hildebrandt
        ... I sure is a way of making the config LESS redundant and thus making thing either work every- or nowhere. ... Pne could argue that the same thing could
        Message 3 of 6 , Nov 2, 2012
        • 0 Attachment
          * /dev/rob0 <postfix-users@...>:

          > I'm not saying it is a "bad" idea. It might even be something for
          > Wietse to consider if/when work begins on a non-compatible Postfix
          > "3.0". I think it would be difficult to ensure downgradability with
          > such a feature.

          I sure is a way of making the config LESS redundant and thus making
          thing either work every- or nowhere.

          > And this fits in with the general Unix philosophy of small tools
          > which do one job well and can work together to do big jobs. It's
          > upgrade- and downgrade-resistant, also.

          Pne could argue that the same thing could somehow be done by using m4.

          --
          [*] sys4 AG

          http://sys4.de, +49 (89) 30 90 46 64
          Franziskanerstraße 15, 81669 München

          Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
          Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
          Aufsichtsratsvorsitzender: Joerg Heidrich
        • Wietse Venema
          ... And include totally screws up the possibility to mechanically updating (adding/replacing) entries. Don t make the mistake to think that these files are
          Message 4 of 6 , Nov 2, 2012
          • 0 Attachment
            Ralf Hildebrandt:
            > * /dev/rob0 <postfix-users@...>:
            >
            > > I'm not saying it is a "bad" idea. It might even be something for
            > > Wietse to consider if/when work begins on a non-compatible Postfix
            > > "3.0". I think it would be difficult to ensure downgradability with
            > > such a feature.
            >
            > I sure is a way of making the config LESS redundant and thus making
            > thing either work every- or nowhere.

            And "include" totally screws up the possibility to mechanically
            updating (adding/replacing) entries.

            Don't make the mistake to think that these files are meant to be
            maintained by hand.

            Wietse
          Your message has been successfully submitted and would be delivered to recipients shortly.