On 2021-10-18, Nick Rickard via Exim-users <exim-users@exim.org> wrote:
>>> Does
>>>
>>>    dnslists =    abcdef.sbl.dq.spamhaus.net
>>>    condition =    ${if match_ip ($dnslist_value) {127.0.0.0/24}}
>>>
>>> do what you need?
>> 
>> Yes, thank you.
>> 
>> Noting that it should, I believe, be curly brackets throughout the condition.
>> 
>> 
> Hmm, I spoke to soon. For my use case, Spamhaus does not always return a 
> single (IP adddress) value leading to errors such as:
>
> connect" ACL: failed to expand ACL string "${if match_ip {$dnslist_value} 
> {127.0.0.0/24}}": "127.0.0.3, 127.0.0.2" is not an IP address
>
> But thank you for the pointer; it feels that with a bit of working through 
> the logic I should be able to make it work.

You've probably already figured this out, but here's a hint anyway:
 
   ${if forany{<, $dnslist_value}{match_ip {$item}{127.0.0.0/24}}}

-- 
  Jasen.

-- 
## 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/

Reply via email to