[Exim] Re: net-lsearch not available in expansion lookups?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Tore Anderson
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] Re: net-lsearch not available in expansion lookups?
* Tore Anderson

 >     $ echo 1.2.3.0/24 > /tmp/foo
 >     $ exim -be '${lookup {1.2.3.4} lsearch {/tmp/foo}  {found}{not found}}'
 >     not found


* Andreas Steinmetz

> Why don't you just do something like:
>
> ${lookup{${mask:$sender_host_address/24}}lsearch*{/path/to/file}}


Because the above postulates that every network defined in my file
is a /24-network, which isn't the case. I could repeat the lookup
once for each possible netmask value inside an or{}, of course, but
that isn't exactly pretty as it'll require a total of 65 individual
conditions to be fully generic..

--
Tore Anderson