著者: Pat Lashley 日付: To: exim-users, Pat Lashley CC: Robert Kehl 題目: Re: [Exim] Multi-condition ACL statement in a macro possible?
--On Monday, September 15, 2003 09:54:56 +0100 Philip Hazel
<ph10@???> wrote:
>> What I need is a way to expand the macro to multiple lines.
>
> There is no way to do that. A macro reference replaces a part of a line.
> It cannot turn one line into more than one line. Sorry, but that's the
> way the macros are implemented.
That's what I was afraid of. Oh well...
> What you could do, at the cost of some complication whenever you update
> the configuration, is to use a Perl script (or whatever) to pre-process
> a "source" configuration into the running configuration. Heck! That is
> beginning to sound like what happened to Another MTA... and I thought I
> could keep it all so simple...
Hmm. A preprocessor that just did macro definition/expansion, .include
processing and comment removal might be useful it the overhead of loading
the included files looked like it was becoming significant. And it would
be easy to do as a stand-alone contributed app.
But I suspect that a bigger performance advantage could be had with
an app that would compile the config file, complete with includes
and macro expansions, into some byte-coded form; along with mods
to exim's config file reader to enable it to read the pre-digested
config. (Or even take the emacs approach - if there is a compiled
version and its modified time is later than that of the ASCII version,
use it; otherwise use the ASCII version.)
In any case, for now, the macro-expanding-to-include is probably the
best way for my needs.