[Exim] CIDR-style addresses and net-dbm lookups

Pàgina inicial
Delete this message
Reply to this message
Autor: Christopher Snell
Data:  
A: exim-users
Assumpte: [Exim] CIDR-style addresses and net-dbm lookups
Hi,

I'm trying to set up blocking of known spamhaus netblocks at SMTP connect
time, using an ACL. Here's the problem I've run into: my database of
netblocks consists of CIDR-style addresses of various netmasks. There are
/32's, /10's and just about everything in between. I know that Exim can
lookup CIDR-style addresses from a DBM but, from what I'm reading,
netblocks must be put into individual DBM files based on their netmask.
This will work:

  deny hosts = net10-dbm;/etc/mail/prohibited_netblocks_slash10.dbm:\
               net11-dbm;/etc/mail/prohibited_netblocks_slash11.dbm:\


and so on.

This, however, is kind of a nightmare when you're dealing with a wide
variety of different netblock sizes. Is there any way to have lookup from
a DBM file containing a many different sizes of CIDR blocks?

Something like this would be cool:

deny hosts = netmulti-dbm;/etc/mail/prohibited_netblocks.dbm

thanks in advance,

Chris Snell