[Exim] ip address mask operation in filters

Pàgina inicial
Delete this message
Reply to this message
Autor: Bill Duncan
Data:  
A: exim-users
Assumpte: [Exim] ip address mask operation in filters
I'm trying to set up filtering on a subnet of ip addresses, which because
of some other conditions I need to test, I can't just do in the
host_reject or host_reject_recipients of the config file like other
subnets I'm filtering out.

I have a system filter set up which is working fine except for the testing
of the subnet I want filtered. There are no examples in the documentation
for using it with variables, so I've been trying to guess how it would work.

Something like this is what I would like: (identifying information disguised
to protect the guilty)


if ( "10.1.2.0/24" is ${mask:$sender_host_address/24} or
     $sender_host_name contains "spamdomain.com" ) and not
     ... some other exceptions to the rule ...
then
   freeze text "Probably spam, temporary hold on spamdomain.com"
   finish
endif



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.)

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.
All the different things I've tried seem to be a syntax error.

Anyone help?

Thanks.
--
Bill Duncan, VE3IED  | BeachNet  -->  http://www.beachnet.org
bduncan@??? |   - Network/System Administration
+1 416 693-5960      |   - System Analysis/Design/Programming