Re: [exim] Do ACL's have any kind of jump to or goto command…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: John W. Baxter
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Do ACL's have any kind of jump to or goto command?
On 1/8/06 4:20 PM, "Giuliano Gavazzi" <dev+lists@???> wrote:

>
> On 9 Jan 2006, at 01:00, Marc Perkel wrote:
>
>> I don't know if the ACLs have this but here's what I want to do. I
>> want to test to see if a directory exists and if it doesn't I want
>> to jump past a dozen other tests to some label. Is there any kind
>> of goto label in ACLs?
>
> e.g.
>
> warn message = mark perkel asks the wrong question
> ${if exists {directory_path}\
>               {yes}{no}}
> test1
> test2
> ...

>
> but if a test gives a negative result all subsequent will not be
> called. You could instead set a flag (acl_mX) in the ${if exists }
> and use that as a condition for your conditional tests.
> Or you could wrap each test (if the logical result is not important)
> in a ${if {yes}{yes}} construct. Ah, the thinks you can think!


Also one must beware of permissions--Exim is running the ACLs as the exim
user (perhaps named exim; perhaps something else). It may not be able to
see whether a particular file exists. Of course, it may be possible to
arrange permissions to work. It wasn't in one case where I wanted to do an
existence test in an ACL.

And be especially wary of "fixes" in such cases. You don't want Exim
running as root; you don't necessarily want to "fudge" the permissions
depending on what the file in question is.

--John