Re: [exim] Fearure that Exim should have

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Marc Perkel
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Fearure that Exim should have


Wakko Warner wrote:
> IMO the ACL section of exim has sort of evolved into a type of programming
> language. With that said, what you have stated reminds me of some
> programming techniques that are quite bad. That is passing data to routines
> using global variables. You stated this way of programming (Or configuring
> in the exim sense) is less clutter. At the time that I did this, it was
> quite annoying to use up 3-4 ACL variables so I could pass information
> between ACL statements which lowered the available variables available to
> hold other information. Granted things have changed and may not be as big a
> deal now.
>
> I still feel that doing something like:
>     warn    acl=some_acl($var1, $var2)
>         or keeping with the exim sense:
>         acl=some_acl{$var1}{$var2}
> would still be preferable to 
>     warn    set $acl_m_var1=$var1
>         set $acl_m_var2=$var2
>         acl=some_acl

>
> $varX are just examples obviously and not valid in a real configuration.
> In my case, these would be just text. My config has an "acl routine" that
> does database query and may update a table depending on the "data" passed
> to it and data it gathered from the database.
>
> I have not thought about how data should be returned once the "routine"
> completes.
>
> However, I would agree that this functionality would be a wishlist item and
> something I would not expect to see anytime in the near future.
>
>


That's what I have in mind. At this point I'm not concerned about
returning anything but I would think that passing parameters would be
fairly simple. You just grab the parameters and put them in some
standard names.

acl=some_acl($var1, $var2)

would be the same as:

set $param1 = $var1
set $param2 = $var2
acl = some_acl

How about it Graeme? You're pretty good that this.