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: [email protected]
FROM: [email protected]
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/