Re: [exim] Exim ACL questions...

Top Page
Delete this message
Reply to this message
Author: Jeremy Harris
Date:  
To: exim-users
New-Topics: Re: [exim] Exim ACL questions... {Scanned}
Subject: Re: [exim] Exim ACL questions...
On 06/02/14 16:05, Ritchie P. Fraser wrote:
> Hi All,
>
> I am struggling with the whole exim ACL rules thing. Syntactically and mixing lists and expansion strings
>
> Given an eMail:
>      TO:   recipient@???
>      FROM:  any@???

>
> Rule (in words)
> ------------------
> If the recipient localpart is a valid recipient
> AND recipient domain is valid
> AND sender domain is not our domain
> AND sending computer is NOT our smarthost
>
> exim ACL so far....
> ---------------------
> allow     domains               =             +local_domains : +relay_sql_domains
>                  local_parts          =             lsearch{local_file.txt}
>                  condition             = ${if \
>                                                                  and{ \
>                                                                                  {  ! {$sender_host_address}{+relay_from_host : +relay_sql_hosts}  } \
>                                                                                  {  ! {$sender_address_domain}{+local_domains : +relay_sql_domains }  } \
>                                                                  } \
>                                                                  {true} \
>                                                                  {false} \
>                                                  }

>
> Am I even going in the right direction?
>
> Can anyone shed some light or point me on the path to understanding and enlightenment, please.


The docs are always your friend.

That said...

The {true}{false} can just be missed out (syntactic sugar).
The pair of and'ed conditions could be written as separate "condition ="
ACL conditions (personal style choice; you might find it easier to read).

but - those sub-conditions are wrong - there's no comparison being done.
Look up "expansion conditions" in the docs.

-- 
Cheers,
    Jeremy