Re: [Exim] ip address mask operation in filters

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Bill Duncan
CC: exim-users
Assumpte: Re: [Exim] ip address mask operation in filters
On Wed, 24 Apr 2002, Bill Duncan wrote:

> if ( "10.1.2.0/24" is ${mask:$sender_host_address/24} or


> The documentation shows how to use the ${mask:...} with a constant. But it's
> rather useless using it with a constant because you can mask it off and form
> the string by hand. (It's a constant, so you know what it is.)


What you have written above looks right.

> I'm at a loss as to how to get this working with a variable. I also need to
> test for the condition that $sender_host_address is a valid non-empty string.


${if !eq {$sender_host_address}{}

tests for not being an empty string. Or, in a filter

if "$sender_host_address" is not ""


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