Re: [exim] Conditional file include?

Etusivu
Poista viesti
Vastaa
Lähettäjä: Dean Brooks
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Conditional file include?
On Fri, Aug 24, 2007 at 02:21:45PM -0500, D. Dante Lorenso wrote:

> Can this be done? Does string replacement happen before include? If
> not, is there some type of if/then/else or switch syntax that could be
> cooked up to do different includes based on the value in $primary_hostname?


Another way would be to enable the CONFIGURE_FILE_USE_NODE option
in the Local/Makefile prior to recompiling Exim. From the spec:

    Some sites may wish to use the same Exim binary on different
    machines that share a file system, but to use different configuration
    files on each machine.  If CONFIGURE_FILE_USE_NODE is defined in
    Local/Makefile, Exim first looks for a file whose name is the
    configuration file name followed by a dot and the machine's node name,
    as obtained from the uname() function. If this file does not exist,
    the standard name is tried. This processing occurs for each file name
    in the list given by CONFIGURE_FILE or -C.


You could have a brief config.hostname for each host, with any macro
definitions specific to that host, and then include a master config file
that is common between all hosts.

You could even set up macro definitions that trigger further includes in the
master config as well.

--
Dean Brooks
dean@???