Re: [Exim] Exim 4 Planning - some comments.

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jonathan Hunter
Dátum:  
Címzett: Philip Hazel
CC: exim-users
Tárgy: Re: [Exim] Exim 4 Planning - some comments.
Philip Hazel wrote:
> I have to admit that that is no more complicated than my proposal, and
> it also simplifies things by not having to worry about parentheses and
> AND and OR (and messy continuation lines).
>
> SO... What do people think? Votes, please.


and:
> 1. Which will be easier for the beginner? (Experienced people will cope
> either way.)


I would definitely go for the ACL syntax. I find it extremely difficult to
look at and reliably parse in my brain a configuration option containing
lots of brackets, ANDs and ORs, continuation lines etc. With an ACL syntax
such as the one proposed, it is clear (or it can be defined, at least!)
which statements will be executed first, and in what order the checks are
done - even for complex ACLs.

To me, that counts for a lot. If nothing else, debugging and troubleshooting
will be made many times easier. The initial definition of an ACL is likely
to be simpler than the 'other' way of doing things, with the added advantage
that rules can be inserted or removed very easily without affecting the rest
of the ACL. Just try modifying a multi-line option containing lots of
brackets, ANDs, ORs etc... I know how hard that can be - I've done it many
times for condition=, require_files= and other similar options :-)

My vote definitely goes for the ACL version.

Hmm... I wonder if there are any other configuration options that could be
expressed as an ACL instead? Perhaps require_files, condition and similar
options could benefit from this? How difficult would it be to offer ACLs as
an alternative form of syntax throughout? (Probably very!)

eg:

accept_recipient = ${ACL:
    accept  address = here@there
    deny    no_sender_verify
    ....
    }


or perhaps using something similar to Andromeda's suggestion:

acl my_acl {
    accept ....
    deny ....
}
accept_recipient = ${ACL:my_acl}


Is there some way of parsing an ACL and turning it into the logical format
Exim currently expects tests to be in? As mentioned by Andromeda and others
(Jeffrey, perhaps?) there might well be a way of converting ACLs into the
logical expressions Exim already uses.

Just my 2p...

Jonathan