Re: [exim] Exim ACL questions... {Scanned}

Top Pagina
Delete this message
Reply to this message
Auteur: Ritchie P. Fraser
Datum:  
Aan: exim-users@exim.org
Oude Onderwerpen: Re: [exim] Exim ACL questions...
Onderwerp: Re: [exim] Exim ACL questions... {Scanned}
Hi Jeremy,

So a...
allow     domains                =             +local_domains : +relay_sql_domains
                 local_parts          =             lsearch{local_file.txt}
                 condition             =     ${if !inlist {$sender_host_address}{+relay_from_host : +relay_sql_hosts}  }
                 condition             =     ${if !inlist {$sender_address_domain}{+local_domains : +relay_sql_domains }  }


...would be better?

Can I actually use a "list" like +local_domains in a condition expression like this? I sort of assumed that I couldn't and wasn't sure how to do it...

Ritchie

-----Original Message-----
From: exim-users-bounces+rpf=marinesoftware.co.uk@??? [mailto:exim-users-bounces+rpf=marinesoftware.co.uk@exim.org] On Behalf Of Jeremy Harris
Sent: 06 February 2014 16:26
To: exim-users@???
Subject: Re: [exim] Exim ACL questions... {Scanned}

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




--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.