Le 05/03/2011 00:18, Stan Hoeppner a écrit :
> lst_ho...@kwsoft.de put forth on 3/4/2011 3:33 PM:
> 
>> BTW, is there any "how-to" for getting the least possible memory
>> footprint for Postfix.
> 
>> - don't use regex/pcre maps
> 
> This isn't necessarily true, is it?  In some cases I would think it's
> dramatically reversed in favor of PCRE tables (unless the Postfix PCRE
> processing code overhead eats up a massive amount of memory).  For
> example, with the following single PCRE I can block a few million,
> literally, residential hosts in the Centurylink (formerly Embarq)
> consumer broadband aDSL network:
> 
> /^.*\.(dyn|dhcp)\.embarqhsd\.net$/  REJECT Please use ISP relay
> 

you can simplify that:
/\.(dyn|dhcp)\.embarqhsd\.net$/  REJECT Please use ISP relay

more generally /^.* is never needed.

anyway, this example is too simple and can be replaced with 2 cdb entries:
.dyn.embarqshd.net      REJECT ...
.dhcp.embarqshd.net     REJECT ...

a "better" example would be
/(\W\d+){4}\..*\.embarqhsd\.net$/       REJECT ...


> To do this with a CIDR would take at least 100 entries to cover all the
> subnets, probably many many more, due to the way they assign blocks by
> state, and rDNS by customer type, with (dyn|dhcp|sta) all existing
> within each of the top level parents.
> 
> To do this with a hash table would require multiple hundreds of entries
> as you'd be limited to using /24s.
> 

Reply via email to