On 4/6/2010 1:35 PM, Robert Lopez wrote:
On Tue, Apr 6, 2010 at 12:23 PM, Wietse Venema<wie...@porcupine.org>  wrote:
Robert Lopez:
Now that you mention the documentation:

SYNOPSIS
        postmap -q "string" cidr:/etc/postfix/filename

        postmap -q - cidr:/etc/postfix/filename<inputfile

DESCRIPTION
...
        To test lookup tables, use the  "postmap  -q"  command  as
        described in the SYNOPSIS above.

It takes some perseverance to find that text.

That is another point that has me confused.
I have been testing to make certain changes I have made to the access file
were really there with postmap -q.

With the movement of IP addresses and CIDR blocks out of the access
file and into a "cidr-ip" file postmap -q would find them in the
cidr-ip.db file.
If I remove the .db ile (As Noel points out not necessary) then I get
an error because postmap seems to only look in database files:

$ postmap -q 222.254.228.0/24 cidr-ip
postmap: fatal: open database cidr-ip.db: No such file or directory

As I originally posted: "An strace of "postmap -q<any-pattern>
cidr-ip" shows it is the cidr-ip.db file that is being read." by
postmap.

The key for a cidr map must be an IP address, not a literal cidr range.

postmap -q 222.254.225.5 cidr:cidr-ip


  -- Noel Jones

Reply via email to