Re: [exim] ACL Subroutine Specification Suggestion

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Magnus Holmgren
Datum:  
To: exim-users
Betreff: Re: [exim] ACL Subroutine Specification Suggestion
On tisdagen den 22 januari 2008, Marc Perkel wrote:
> There has been some talk about parameter passing and returning values
> from ACLs to make them look like functions/subroutines. Not sure if
> progress is being made so I'm going to propose something and see what
> people think.
>
> My suggestion.
>
> warn set $acl_c_my_variable = my_acl apple banana carrot


You'd need a new ACL modifier or expansion item. Ignoring the dollar sign,
that can only mean setting acl_c_my_variable to "my_acl apple banana carrot".

> my_acl:
>
> warn   logwrite = $acl_param1 $acl_param2 $acl_param3
>            acl_return = vegetable


Are you talking generally or are you trying to solve a specific problem?
Unless recursion is needed, the same thing can be accomplished, albeit using
a couple more lines, by setting some ACL variables and then calling the
sub-ACL, which returns its result also by setting a variable. If that's not
good enough, ${perl} may be.

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)


"Exim is better at being younger, whereas sendmail is better for
Scrabble (50 point bonus for clearing your rack)" -- Dave Evans