> > For example, spool_directory could just be expanded. Then I could
> > just configure it thusly:
> >
> > .ifdef SPOOL_DIRECTORY
> > spool_directory = SPOOL_DIRECTORY
> > .else
> > spool_directory = ${if def:acl_m0 {$acl_m0}{/var/spool/exim}}
> > .endif
>
> That is an interesting idea, but it would involve deciding exactly
> when the expansion should take place. Also, it wouldn't work because of
> a chicken-and-egg problem. The variable $acl_m0 is stored, for each
> message, .... wait for it .... *on the spool* :-( So when an instance
> of Exim is started to deliver message X, it has to read X from the spool
> before it can find the spool. Hmm. See what I mean about redesign?
There are two times when you need to know the spool directory: when
writing the message as it is received, which Exim starts to do after the
message header has arrived; and when reading the message to attempt
delivery.
If you expanded spool_directory when you start to write the message body,
you could decide the location based on any of the information available at
that point - but not trivially based on recipient address(es) except by
fiddling with $recipients.
There are two sub-cases for deliveries: immediate deliveries and queue
runner deliveries. In the former case you want to propagate the original
setting of spool_directory through to the delivery processes; in the
latter case you probably want to set the spool directory when starting the
queue runner and propagate it to the delivery processes from there.
Is that plausible?
Tony.
--
<fanf@???> <dot@???>
http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}