Re: [exim] Syntax Inconsistencies

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Marc Perkel
CC: exim-users
Subject: Re: [exim] Syntax Inconsistencies
On Tue, 4 Jul 2006, Marc Perkel wrote:

> It would be nice if the Exim syntax were consistent between the ACLs and
> the transport/routers
>
> For example - ACLs allow multiple condition lines, routers don't. ACLs
> allow !condition - routers don't. Exim would be far easier to work with
> if the router and ACL commands were more consistent.
>
> Not trying to complain - just making a suggestion for improvement.


It's partly history (routers have been there since the start of Exim;
ACLs were not there until Exim 4), and partly because

(a) In a router, "condition", is an option. Options have one value;
therefore you can set it only once. All the options in a router are set
(though not necessarily evaluated) when the config is read. They may be
given in (almost) any order.

(b) An ACL is more like a script. The order in which things are listed
matters, because they are obeyed in order. That is why you can have more
than one of anything.

Now, we could extend some options in routers to be vectors rather than
scalars, and allow multiple occurrences to set multiple values, but for
many router options (e.g. "driver"), it would not make sense. It would
also introduce some notion of order, which would be a new thing. I am
not convinced that it would actually reduce the diffences very much, and
it could be equally confusing.

One would have to change the notion of routers to be more script-like -
which is a large, very incompatible change, to achieve anything like
consistency.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book