Re: [exim] - Need help on ACL statement (subcondition)

Top Page
Delete this message
Reply to this message
Author: Laurent RISSE
Date:  
To: Dan_Mitton
CC: exim-users
Subject: Re: [exim] - Need help on ACL statement (subcondition)
Dear all,

I finally solved the thing by myself, but in fact, it's exactly like that:

condition = ${if or {
                    {and
                    {
                           {eq {${lc:$sender_helo_name}}{string1}}
                           {eq {$sender_host_address}{XX.XX.XX.XX}}}
                    }
                    {and
                    {
                           {eq {${lc:$sender_helo_name}}{string2}}
                           {eq {$sender_host_address}{XX.XX.XX.XX}}}
                    }
                    } {true}{false}
}


And you're all right !

Thanks again to all !

Best regards

Laurent
-------

Dan_Mitton@??? wrote:
> Have you tried...
>
> ${if or {
> {
> and {{eq {${lc:$sender_helo_name}}{string2}}
> {eq{$sender_host_address}{XX.XX.XX.XX}}}
> }
> {
> and {{eq {${lc:$sender_helo_name}}{string2}} {eq
> {$sender_host_address}{XX.XX.XX.XX}}}
> }
> {
> and {{eq {${lc:$sender_helo_name}}{string3}} {eq
> {$sender_host_address}{XX.XX.XX.XX}}}
> }
> }
> {true}{false}
> }
>
>
>
> Sent by: exim-users-bounces@???
> To: exim-users@???
> cc: (bcc: Dan Mitton/YD/RWDOE)
> Subject: [exim] - Need help on ACL statement (subcondition)
> LSN: Not Relevant
> User Filed as: Not a Record
>
> Hi all,
>
> hope everybody is OK.
>
> I try to make an ACL working with a series of statements...
>
> Well, it consist of two "OR" tests, like that:
>
> (
> $a == "string1" AND $b == "IP1"
> OR
> $c == "string2" AND $d == "IP2"
> OR
> $e == "string3" AND $f == "IP3"
> )
>
> I write a test ACL like this:
>
> ${if or {
> {
> ${if and {{eq {${lc:$sender_helo_name}}{string2}}
> {eq{$sender_host_address}{XX.XX.XX.XX}}} {true}{false}
> }
> }
> {
> ${if and {{eq {${lc:$sender_helo_name}}{string2}} {eq
> {$sender_host_address}{XX.XX.XX.XX}}} {true}{false}
> }
> }
> {
> ${if and {{eq {${lc:$sender_helo_name}}{string3}} {eq
> {$sender_host_address}{XX.XX.XX.XX}}} {true}{false}
> }
> }
> }
> {true}{false}
> }
>
> My goal is to make a check on an peer consisting of a HELO string given
> by the remote host with a combination of a certain incoming IP address...
>
> After some tests, EXIM don't want this syntax, and I don't know if
> "condition inside condition" concept is working (subconditioning !) ?
>
> I hope that someone could help me on that topic :)
>
> Thanks to all
>
> Regards
>
> Laurent
> -------
>