On szo, jan 12, 2013 at 14:11:12 +0100, Bastian Blank wrote:
> On Sat, Jan 12, 2013 at 01:51:26PM +0100, LEVAI Daniel wrote:
> > 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.
> 
> PostgreSQL handles CIDR with some special functions and operators. See
> http://www.postgresql.org/docs/9.2/interactive/functions-net.html

The type in PostgreSQL is irrelevant. Ignore it. That is not part of the
question. It is just a string that Postfix queries. For example
currently (when querying single IP addresses for check_client_access)
the column in question is a varchar...

> > 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).
> 
> No. If it is not documented, it does not exist.

Well, if there is a `cidr:' map that can be queried for cidr networks,
and there is a `pgsql:' map, that can be queried for virtually anything
(sender_access, header_checks, helo_access etc...) I think there is a
slight chance that the two can be combined somehow.


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