On 2016-06-01, Sven Eschenberg <[email protected]> wrote:
> Hi list,
>
> Maybe I got something fundamentally wrong regarding expansions, but I am 
> seeing a behavior I consider a little inconsistent.
>
> exim -oMi 127.0.0.1 -be '${extract{$received_ip_address}{10.0.0.1=hosta 
> 127.0.0.1=local4 ::1=local6}{$value}fail}'
> local4
>
> (expected)
>
> exim -oMi 127.0.0.2 -be '${extract{$received_ip_address}{10.0.0.1=hosta 
> 127.0.0.1=local4 ::1=local6}{$value}fail}'
> Failed: "extract" failed and "fail" requested
>
> (expected)
>
> exim  -be '${extract{$received_ip_address}{10.0.0.1=hosta 
> 127.0.0.1=local4 ::1=local6}{$value}fail}'
> Failed: first argument of "extract" must not be empty
>
> That was somewhat expected, the docs say the key must not consist of all 
> digits. There's no hint on what happens if the key is empty.

 {} contains nothing but digits 
 {} contains no digits


easist fix is to pad the key with a letter

/usr/sbin/exim  -be '${extract{X$received_ip_address}{X10.0.0.1=hosta
X127.0.0.1=local4 X::1=local6}{$value}fail}'

> exim -be '${if 
> def:received_ip_address{${extract{$received_ip_address}{10.0.0.1=hosta 
> 127.0.0.1=local4 ::1=local6}{$value}fail}}fail}'
> Failed: missing or misplaced { or }

that's a bug which has been fixed now. 


It's fixed in debian 8.4 but present in debian 8.3  

I'm not sure which release your ubuntu is based on


-- 
  \_(ツ)_

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