Am I really using a CIDR map?

2010-04-06 Thread Robert Lopez
For some time I have been tracking changes to the access table with RCS. Each time a change is made the "ci access" results in the removal of the access file from /etc/postfix and leaving the /etc/postfix.access.db file. Today I tried to check in a cidr table named cidr-ip. Upon check-in (and res

Re: Am I really using a CIDR map?

2010-04-06 Thread Wietse Venema
Robert Lopez: > A "postmap -q cidr-ip" returns the rest of the > matching line correctly. This uses the default database type, which is "hash:" on most systems. Thus. Postfix opens "hash:cidr-ip" which results in opening cidr-ip.db. To query a CIDR file, specify cidr:filename, just like you have

Re: Am I really using a CIDR map?

2010-04-06 Thread Noel Jones
On 4/6/2010 11:39 AM, Robert Lopez wrote: For some time I have been tracking changes to the access table with RCS. Each time a change is made the "ci access" results in the removal of the access file from /etc/postfix and leaving the /etc/postfix.access.db file. Today I tried to check in a cidr

Re: Am I really using a CIDR map?

2010-04-06 Thread Robert Lopez
On Tue, Apr 6, 2010 at 10:52 AM, Noel Jones wrote: > On 4/6/2010 11:39 AM, Robert Lopez wrote: >> >> For some time I have been tracking changes to the access table with RCS. >> Each time a change is made the "ci access" results in the removal of >> the access file  from /etc/postfix and leaving th

Re: Am I really using a CIDR map?

2010-04-06 Thread Noel Jones
On 4/6/2010 12:57 PM, Robert Lopez wrote: On Tue, Apr 6, 2010 at 10:52 AM, Noel Jones wrote: On 4/6/2010 11:39 AM, Robert Lopez wrote: For some time I have been tracking changes to the access table with RCS. Each time a change is made the "ci access" results in the removal of the access file

Re: Am I really using a CIDR map?

2010-04-06 Thread Wietse Venema
Robert Lopez: Now that you mention the documentation: > SYNOPSIS >postmap -q "string" cidr:/etc/postfix/filename > >postmap -q - cidr:/etc/postfix/filename > DESCRIPTION ... >To test lookup tables, use the "postmap -q" command as >described in the SYNOPSIS ab

Re: Am I really using a CIDR map?

2010-04-06 Thread /dev/rob0
On Tue, Apr 06, 2010 at 11:57:00AM -0600, Robert Lopez wrote: > On Tue, Apr 6, 2010 at 10:52 AM, Noel Jones > wrote: > > On 4/6/2010 11:39 AM, Robert Lopez wrote: > >> Why does postfix not like the source file being removed from the > >> /etc/postfix directory? > > > > cidr tables are plain-text t

Re: Am I really using a CIDR map?

2010-04-06 Thread Robert Lopez
On Tue, Apr 6, 2010 at 12:23 PM, Wietse Venema wrote: > Robert Lopez: > Now that you mention the documentation: > >> SYNOPSIS >>        postmap -q "string" cidr:/etc/postfix/filename >> >>        postmap -q - cidr:/etc/postfix/filename > >> DESCRIPTION > ... >>        To test lookup tables, use th

Re: Am I really using a CIDR map?

2010-04-06 Thread Noel Jones
On 4/6/2010 1:35 PM, Robert Lopez wrote: On Tue, Apr 6, 2010 at 12:23 PM, Wietse Venema wrote: Robert Lopez: Now that you mention the documentation: SYNOPSIS postmap -q "string" cidr:/etc/postfix/filename postmap -q - cidr:/etc/postfix/filename ... To test lookup tab

Re: Am I really using a CIDR map?

2010-04-06 Thread Charles Marcus
On 2010-04-06 2:35 PM, Robert Lopez wrote: > 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 Did y

Re: Am I really using a CIDR map?

2010-04-06 Thread Robert Lopez
On Tue, Apr 6, 2010 at 12:33 PM, /dev/rob0 wrote: > On Tue, Apr 06, 2010 at 11:57:00AM -0600, Robert Lopez wrote: >> On Tue, Apr 6, 2010 at 10:52 AM, Noel Jones >> wrote: >> > On 4/6/2010 11:39 AM, Robert Lopez wrote: >> >> Why does postfix not like the source file being removed from the >> >> /e

Re: Am I really using a CIDR map?

2010-04-06 Thread Noel Jones
On 4/6/2010 1:42 PM, Robert Lopez wrote: The Postfix mail system uses optional lookup tables as described in the DATABASE_README document. Lists of IP addresses can be specified in CIDR (Classless Inter-Domain Routing) form. In this case, a plain text file is the map, with the standard "key white

Re: Am I really using a CIDR map?

2010-04-06 Thread Robert Lopez
On Tue, Apr 6, 2010 at 12:48 PM, Noel Jones wrote: > On 4/6/2010 1:42 PM, Robert Lopez wrote: >>> >>> The Postfix mail system uses optional lookup tables as described in >>> the DATABASE_README document. Lists of IP addresses can be specified >>> in CIDR (Classless Inter-Domain Routing) form. In t

Re: Am I really using a CIDR map?

2010-04-06 Thread Robert Lopez
I replied to Charles thinking I was replying to the list... On Tue, Apr 6, 2010 at 12:40 PM, Charles Marcus wrote: > On 2010-04-06 2:35 PM, Robert Lopez wrote: >> 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

Re: Am I really using a CIDR map?

2010-04-06 Thread Wietse Venema
Robert Lopez: > On Tue, Apr 6, 2010 at 12:23 PM, Wietse Venema wrote: > > Robert Lopez: > > Now that you mention the documentation: > > > >> SYNOPSIS > >> ? ? ? ?postmap -q "string" cidr:/etc/postfix/filename > >> > >> ? ? ? ?postmap -q - cidr:/etc/postfix/filename >> > >> DESCRIPTION > > ... > >

Re: Am I really using a CIDR map?

2010-04-07 Thread Stan Hoeppner
Robert Lopez put forth on 4/6/2010 1:56 PM: > Then then this is working: > $ postmap -q 222.254.228.0 cidr:/etc/postfix/cidr-ip > DISCARD > $ postmap -q 222.254.228.1 cidr:/etc/postfix/cidr-ip > DISCARD > > So, now I understand. Don't feel bad Robert. I went through pretty much the same thing y