Re: [exim] Ok, this time with feeling!

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Sherwood Botsford
Data:  
Para: exim-users, Tony Finch
CC: 
Assunto: Re: [exim] Ok, this time with feeling!
On Tuesday 05 October 2004 11:14, you wrote:
> On Tue, 5 Oct 2004, Sherwood Botsford wrote:
> > One of the reasons I switched to exim years ago was
> > that the conf files were much more readable than
> > sendmail conf files. Alas, conditions are pushing in
> > this direction. (I have to use the bracket matching
> > feature in vi to parse them just reading them.)
>
> Careful layout can help a lot. Here's a relatively
> complicated example from my configuration which shows a
> few features of my layout style.
>
>   deny     message       = Please use your name when
> saying HELO (not $sender_helo_name) 
> !verify        = helo
>            condition     = ${if or{ \
>                          { eq{$acl_c1}{bad} } \
>                          { isip{$sender_helo_name} } \
>                          {
> eq{$sender_helo_name}{$local_part} } \ {
> match_domain{$sender_helo_name}{+our_domains} } \ } {yes}
> {no} } set acl_c1    = bad

>


Yeah, but I hate prefix notation. I get internal stack
overflows while parsing it. I wish I could write the
condition as:

condition if {
    {$acl_c1 eq bad} or  \
    isip{$sender_helo_name} or \
    {$sender_helo_name eq $local_part} or\
    {$sender_helo_name match_domain +our_domains}
    } #End of condition
    then {yes}
    else {no}


(Ok, ok, match_domain should be a function... But writing
logical operators as functions makes it hard...)

I'm sure that Phillip had good reason for doing as prefix
notation, perhaps because the parser was easier to write,
but at least initially I'm sweating bullets to understand
them.

Then again, I used to use an HP calculator, with postfix
notation. Once I got used to it, it was wonderful, because
it eliminated nearly all use of parentheses. So maybe this
is also just a matter of time.

--
Sherwood Botsford
St. John's School of Alberta