[exim] ${lookup{value}lsearch{file}{yes}{no}} tricks help re…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: supportsobaka
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [exim] ${lookup{value}lsearch{file}{yes}{no}} tricks help request
Could someone help with syntax of ${lookup{value}lsearch{file}{yes}{no}}

I'm trying to write a condition that will return "FALSE" if either of hosts from "Received:" headers (yes, any on the way from sender's server to me) is listed in /etc/whitelist_networks, otherwise "TRUE".

This will work:

deny
 condition = ${if !match{$h_Received:}{1.1.1.1}}
But I want to have a whitelist file, so I'm trying this:

deny
 condition = \
 ${lookup{$h_Received:}\
 lsearch*{/etc/whitelist_networks}\
 {no}{yes}} This obviously will not work.

Is there an opposite to above way to say exim: "search a partial match of the line from  /etc/whitelist_networks in  $h_Received?"

Thanks