On szo, jan 12, 2013 at 13:17:45 +0100, Benny Pedersen wrote:
> LEVAI Daniel skrev den 2013-01-12 09:51:
> 
> >... which works for unique IP lookups, but I wish to use CIDR
> >postfixes.
> >Is it possible to combine the cidr:<filename> lookups with
> >proxy:pgsql?
> 
> http://pastebin.com/RMKBmW0p
> 
> postgresql support cidr, so its just create it :=)
> 
> untested since i have not compiled postgres into postfix yet

How should I put this... My question is not in regards to how to store
IP networks (w/ CIDR postfix) in PostgreSQL; this is somewhat given.

My question is how can I make Postfix understand the IP/CIDR notation
for `check_client_access = proxy:pgsql' checks, when the SQL query
returns not a single IP or a subnet (by leaving the decimal octets from
the end of the IP address), but a network address using CIDR notation
(eg.: 1.1.1.1/20).

In other words, if I wanted to match for 1.1.1.0/24, I could certainly
make do with the original configuration, and just make the query return
'1.1.1'. But if I wanted to match for 1.1.1.0/20, then I'd be in trouble
now, wouldn't I.


Daniel

-- 
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D  650C C69B BE4C 83B6 3A8F

Reply via email to