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

Re: Include Config Files?

Expand Messages
  • Victor Duchovni
    ... It is not possible with aliases either. The :include: syntax on the RHS of the aliases file is not a mechanism for extending the aliases file with
    Message 1 of 3 , Jun 2, 2008
    • 0 Attachment
      On Mon, Jun 02, 2008 at 04:28:56PM +0200, Hannes Erven wrote:

      > Hi folks,
      >
      >
      > I was wandering if it was possible to split the main.cf configuration
      > file in multiple parts, e.g.:
      >
      >
      > mynetworks = ...
      > myhostname = ...
      >
      > include /path/to/file
      >
      >
      > I searched the docs, but including seems only to be possible with aliases.

      It is not possible with aliases either. The ":include:" syntax on the RHS
      of the aliases file is not a mechanism for extending the aliases file with
      additional "lhs: rhs" entries. Rather it is an indirection mechanism for
      a single "rhs" value. Not too dissimilar from "mynetworks = /some/file".

      > One possible "workaround" would of course be to concatenate all "source"
      > config files into main.cf, but that seems not really elegant to me, is it?

      Concatenate is the answer. make(1) is a good tool for such work.

      --
      Viktor.

      Disclaimer: off-list followups get on-list replies or get ignored.
      Please do not ignore the "Reply-To" header.

      To unsubscribe from the postfix-users list, visit
      http://www.postfix.org/lists.html or click the link below:
      <mailto:majordomo@...?body=unsubscribe%20postfix-users>

      If my response solves your problem, the best way to thank me is to not
      send an "it worked, thanks" follow-up. If you must respond, please put
      "It worked, thanks" in the "Subject" so I can delete these quickly.
    • Wietse Venema
      ... And how would postconf -e know what file it should change? ... If you haven t learned to use make , then you are working too hard. Wietse
      Message 2 of 3 , Jun 2, 2008
      • 0 Attachment
        Hannes Erven:
        > I was wandering if it was possible to split the main.cf configuration
        > file in multiple parts, e.g.:
        >
        > mynetworks = ...
        > myhostname = ...
        >
        > include /path/to/file

        And how would "postconf -e" know what file it should change?

        > One possible "workaround" would of course be to concatenate all "source"
        > config files into main.cf, but that seems not really elegant to me, is it?

        If you haven't learned to use "make", then you are working too hard.

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