Re: [exim] Fearure that Exim should have

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Wakko Warner
Date:  
À: exim-users
Sujet: Re: [exim] Fearure that Exim should have
Eli Sand wrote:
> > I seem to recall wanting this same functionality myself. I am
> > currently using acl variables, but I believe it would look much better
> > if the parameters could be passed in another way. This was written
> > before there were named acl variables (back when there was just 0-9).
>
> Personally I don't think that it would truly solve your problem of clutter -
> you'd simply be putting the clutter somewhere else. In the end people would
> have extremely long lines calling other acl sections, and then they would
> complain about long acl lines and in an attempt to solve that they would
> resort to using acl variables (as we currently have them) and then passing
> those variables to acls to shorten the acl calls - by which time you'd have
> more lines of code to do the same thing you do right now.
>
> Not to mention the confusion you'd have reading the configuration file
> should people choose to re-use variable names in different acl sections.
> You'd have to carefully scan parts of the config file to find out exactly
> what data is being passed where.
>
> I'm not saying some overhaul to acl variables isn't something I've thought
> about - I just believe that this particular request would not serve to
> better Exim in the end.


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.

--
Lab tests show that use of micro$oft causes cancer in lab animals
Got Gas???