This is a great idea and it completely takes care of everything. Well,
almost everything. Since the hosts change roles periodically, the
contents of host.conf would need to change for each host too, but this
file would be easy to generate from the exim start up script.
Thanks, Marc!!!
On Mon, 2006-03-20 at 18:25 -0500, Marc Sherman wrote:
> Sergei Gerasenko wrote:
> >
> > Ideally, I would like to keep one configuration file for both hosts. The
> > problem with macros is that for this to work I would need to find every
> > place where direct invocations of exim are made and pass the appropriate
> > -D's as paramaters. Not good :)
>
> Try putting this at the top of your config file:
>
> .include /etc/exim4/host.conf
>
> and on each machine, create the file /etc/exim4/host.conf with a single
> line, defining the macro you use to identify the different hosts. If
> you forget to define the file on a new machine, exim will fail to launch
> with a config error; if you don't want that behaviour, but instead can
> define some sensible defaults, use .include_if_exists instead.
>
> http://exim.org/exim-html-4.60/doc/html/spec.html/ch06.html#id2536996
>
> - Marc
>
>