Re: [Exim] Variables in the .include

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Dr Andrew C Aitchison
Dátum:  
Címzett: mwalkup
CC: exim-users
Tárgy: Re: [Exim] Variables in the .include
On Fri, 21 Nov 2003 mwalkup@??? wrote:

> This, may seem like a strange question, but is there any way to use
> an environment variable in a .include?
> ie: .include \\\"/etc/exim/$HOSTNAME.conf\\\" ?
>
> Im using CVS, and this would allow me to save all the configs to the CVS
> (as different files), and just have my exim.conf include the hostname
> configuration it needs.
>
> My example fails btw, and also:
>
> .include \\\"/etc/exim/${primary_hostname}.conf\\\"
>
> fails. I was thinking that because primary_hostname wasnt set it,
> it would use the uname.


Since you are looking at hostnames a lot, I'll remind you of the
*COMPILE* time option "CONFIGURE_FILE_USE_NODE".
src/EDITME says something like:
# In some installations there may be multiple machines sharing file systems,
# where a different configuration file is required for Exim on the different
# machines. If CONFIGURE_FILE_USE_NODE is defined, then Exim will first look
# for a configuration file whose name is that defined by CONFIGURE_FILE,
# with the node name obtained by uname() tacked on the end, separated by a
# period (for example, /usr/exim/configure.host.in.some.domain). If this file
# does not exist, then the bare configuration file name is tried.

# CONFIGURE_FILE_USE_NODE=yes


--
Dr. Andrew C. Aitchison        Computer Officer, DPMMS, Cambridge
A.C.Aitchison@???    http://www.dpmms.cam.ac.uk/~werdna