Re: [exim] failed to expand condition

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Valentin S. Ryabinin
CC: exim-users
Sujet: Re: [exim] failed to expand condition
On Thu, 26 Aug 2004, Valentin S. Ryabinin wrote:

> condition = "${if and {\
> {!eq {${mask:$sender_host_address/24}}{192.168.0.0/24}}\
> {<{$message_size}{128k}}}{1}{0}}"


That should yield 1 if the sender host address is NOT in 192.168.0.0/24
and the message size is < 128K.

> 15:13:19 32215 expanding: $sender_host_address/24
> 15:13:19 32215    result: 10.0.0.12/24
> 15:13:19 32215 expanding: ${mask:$sender_host_address/24}
> 15:13:19 32215    result: 10.0.0.0/24


So the first subcondition is true (sender host address is not in
192.168.0.0/24).

> 15:13:19 32215 expanding: 192.168.0.0/24
> 15:13:19 32215    result: 192.168.0.0/24
> 15:13:19 32215 expanding: $message_size
> 15:13:19 32215    result: 498


So the second subcondition is also true (message size is < 128k).

> 15:13:19 32215 condition: and {{!eq
> {${mask:$sender_host_address/24}}{192.168.0.0/24}}{<{$message_size}{128k}}}
> 15:13:19 32215    result: true


So the whole contidion is true.

> 15:13:19 32215 expanding: ${if and {{!eq
> {${mask:$sender_host_address/24}}{192.168.0.0/24}}{<{$message_size}{128k}}}{1}{0}}}
> 15:13:19 32215    result: 1


So the result is 1.

> 15:13:19 32215 calling spamoracle_router router
>
> what is wrong?


I don't know. It doesn't look wrong to me.

Regards,
Philip

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.