Autor: John W. Baxter Data: A: exim-users Assumpte: Re: [exim] Idea: Predefined macros
On 5/3/07 2:11 AM, "Philip Hazel" <ph10@???> wrote:
> You have always been able to write your own "edit the Exim config"
> script (compare visudo and similar) that allows you to edit the file,
> then transforms it in any way you like, possibly even tests it (there's
> a thought :-) and then installs the result for Exim to use.
>
> There are plenty of Unix tools to help you do this. I'm afraid I don't
> see why Exim should invent another one.
I do a very weak test in my Exim config install script (exim -bV), and abort
the install if that fails. (Then I have to rush off and do something about
the panic log before our monitor pages my co-workers.)
(Our configs are stored in subversion..."installing" essentially involves
getting them from the Subversion working directory into the directory Exim
thinks they are in--with the right ownership--and doing the HUP. There's a
bit more to it, of course.)
Currently, I use patch to fix up the server-specific macros which sit in a
block near the start of the file. I've had a very low priority desire to
switch to using sed to replace the macros in place (there Is nothing fancy
in terms of macro in macro to worry about, although the prettiness that
macros provide (in some lookups) will be lost. Readability may yet trump
cpu cycles, though ("you paid for those cycles, you might as well use
them"*).
I elect not to use m4 for this (I escaped from learning m4 when we switched
to Exim (1.something) years ago).
--John (* the thing about cycles is hard to write for one whose mother
spent long hours at home optimizing variable placement on an IBM 650)