On 2007-12-12 at 21:03 -0500, Daniel Aquino wrote: > Thats cool that it works in real time I would think string expansion
> would be a single event that hard wires a value into the config...
That's macros.
Take a look at "spec.txt" or one of the other format variants of The
Exim Specification (HTML, PDF, etc etc); Exim has the best documentation
of any software product I've ever worked with. The documentation is the
specification and if the specification and implementation diverge then
it's a reportable bug.
Section 6, "The Exim run time configuration file".
Note that many of the rules making routing or delivery decisions can
refer to variables which are set per-message or per-recipient. When
evaluating the various options, many are subject to "string expansion";
those options which are so expanded are marked in The Spec (with a "*"
after the option type).
Exim then has a very capable string expansion language; variables,
conditionals, functions, etc. See Section 11, "String expansions". The
language even has map/reduce/forall/forany to provide iteration, yet
Exim's design ensures that you rarely need to get your hands dirty with
those. The functions ("expansion items") include database lookups,
cryptographic primitives, file/socket/command I/O, map/reduce/etc and an
embedded Perl interpreter, as well as basic string manipulation and some
specialist mail functionality. Oh, and ${dlfunc} so if you really
really need some extra functionality and can't provide it via a socket
(Unix-domain or network) and the embedded Perl is too slow, then as long
as you can write C, you can get it dynamically loaded at runtime. Note
though that Exim is designed as an MTA, not as a programming language
platform for playing around (no matter how much it might sometimes look
like one) so you still need to be careful in your libraries; a segfault
will take down the process which encounters it.
Take a closer look at the supplied standard config and read through it
and the copious comments. If Exim came with your operating system and
its configuration is split up into lots of small files then you're
probably using Debian or one of its derivatives, in which case:
Debian's system is great for letting you install packages and have Exim
automatically configured to use them whilst providing simple knobs for
non-postmasters to change Exim's configuration but in achieving this the
maintainers had to make some sacrifices in easy comprehensibility. Take
a look at /usr/share/doc/exim4/examples/example.conf.gz which is the
standard config file shipped with Exim.