Re: [exim] condition = lookup not working

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Adam D. Barratt
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] condition = lookup not working
On 2013-12-31 11:17, Gary Stainburn wrote:
>    warn
> # GPS added 2013-12-31
> # rate limit anything except: local LAN, hosts in 
> /etc/exim/no_rate_limit
>         hosts      = !+internal_lan
>        condition  = ${if ${lookup{$sender_helo_name} \
>                partial-lsearch{/etc/exim/no_rate_limit}} {no}{yes} }
>         ratelimit = 100 / 5m / strict
>         log_message = RATE UPDATE: $sender_rate/$sender_rate_period \
>                 (max $sender_rate_limit)

>
> However, I then get the following error.
>
> 2013-12-31 11:08:06 H=mta20134.pur3.net [94.236.20.134] temporarily
> rejected
> MAIL <agent@???>: failed to expand ACL string "${if
> ${lookup{$sender_helo_name} partial-lsearch{/etc/exim/no_rate_limit}}
> {no}
> {yes} }": condition name expected, but found "${lookup{$sender"


$[lookup} isn't a comparison, so drop the "if":

condition  = ${lookup{$sender_helo_name} \
                 partial-lsearch{/etc/exim/no_rate_limit} {no}{yes} }


Regards,

Adam