Re: [exim] Conditional file include?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Phil Pennock
Date:  
À: D. Dante Lorenso
CC: exim-users
Sujet: Re: [exim] Conditional file include?
On 2007-08-24 at 14:21 -0500, D. Dante Lorenso wrote:
> I'm trying to do a conditional file include so that I can roll out the
> same exim configs to several hosts. I can't seem to get this to work:
>
>     .include /etc/exim/host/${primary_hostname}.conf

>
>     ---
>     Starting exim: 2007-08-24 14:10:54 Exim configuration
>     error in line 5 of /etc/exim/exim.conf: failed to open
>     included configuration file
>     /etc/exim/host/${primary_hostname}.conf
>     ---

>
> 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?


This is all fully yet concisely documented in section 6.3 of The Exim
Specification, "6.3 File inclusions in the configuration file", which
states how early in the parsing process the inclusions are done, what
parsing steps happen _before_ the include processing, etc.

The Exim Specification is available online (via www.exim.org and its
mirrors) and should also have been included with your distribution as a
plaintext file named "spec.txt".

Sections 6.3 through 6.9 are all likely to be of interest to you.

Regards,
-Phil