This is a discussion on Re: Stupid relay question. within the mailing.postfix.users forums, part of the Mail Servers and Related category; Keith wrote regarding 'Re: Stupid relay question.' on Thu, Oct 21 at 09:3= 9: > On Thu, 21 Oct ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Keith wrote regarding 'Re: Stupid relay question.' on Thu, Oct 21 at 09:3=
9: > On Thu, 21 Oct 2004 15:27:12 +0100 > Stefan Morrell <stef@mort.level5.net> wrote: >=20 > > On Thu, Oct 21, 2004 at 04:21:33PM +0200, Magnus B=E4ck wrote: > > > Say what? You can specify any lookup table in mynetworks, including > > > hash (as long as your Postfix is built to support Berkeley DB). Rea= d > > > the documentation. > >=20 > > This list, June 2003 > >=20 > > "To be precise: you can't use network/mask patterns in a hash table. > > If you want to use a hash table for mynetworks, then you have to > > enumerate individual IP addresses. >=20 > If you are using a CIDR netblock you would either need to have each and > every address in the netblock in the table or have some clever lookup > that recognised 123.1.2.3 was in 123.1.0.0/16.=20 >=20 > The first is simply an automated expansion of what you would need to > type in. =20 >=20 > I'll leave it to you to try and work out how to do the latter on a > hashed table. I hope you have plenty of spare time if you accept the > assignment. given address =3D 123.1.2.3 first look up 123 (or 123.0.0.0/8, I suppose) then look up 123.1 then look up 123.1.2 then look up 123.1.2.3 Granted, that will only work for /8 /16 /24 /32, but can't postfix alread= y do that for some lookups, or am I thinking of something else (apache, perhaps)? One could always calculate all of the subnets that an IP exist= s in, and look up those, but that'd be quite a bit of overhead for the mini= mal gain. OTOH, just looking up the sub-IPs isn't much extra work, in an absolute sense. I'd imagine my stupid regexp:/header_checks file is far more significant to performance. :) --Danny |
![]() |
| Thread Tools | |
| Display Modes | |
|
|