On Wed, 3 Apr 2002, Simon Lyall wrote:
> I've a little stuck with using a dbm listing various networks with
> host_accept_relay. I've gone through the archives but I am still confused
> and stuck (sorry). What I have is an /etc/mail/access like:
>
> 127.0.0.1/32
> 10.0.0.0/8
> 203.109.252.0/22
>
> which I turn into a dbm via:
>
> /usr/sbin/exim_dbmbuild /etc/mail/access /etc/mail/access.db
>
> and access via:
>
> host_accept_relay = "net-dbm;/etc/mail/access.db"
Won't work. "net-dbm" will look up the IP address as the key. So it
won't match things with "/xx" on the end. You'll need to do three
lookups:
host_accept_relay = net32-dbm;/etc/mail/access.db :\
net22-dbm;/etc/mail/access.db :\
net8-dbm;/etc/mail/access.db
Remember, DBM files are like an index. You can look up a *fixed* string
only. You have to tell Exim how to compute the fixed string.
> If this isn't easy I was wondering if I am going to take much performance
> hit if I just use the flat file ( host_accept_relay = /etc/mail/access )
> version of the access file? The whole thing is about 30 entries, all CIDR
> (various length masks) and adding up to about a /17.
If you've got lots of different length masks, then the flat included
file might be just as quick. Note: NOT an lsearch file - that works just
like a DBM file as far as the Exim end is concerned.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.