Re: PIBKAC Error

Taj Khattra <[email protected]> Thu, 15 Apr 2004 20:09:19 -0700
Newsgroups gmane.comp.djb.cdb
Message-ID <[email protected]>
On Thu, Apr 15, 2004 at 06:53:18PM -0700, Chris Berry wrote:
> I'm having a bit of trouble creating a cdb file for use with mailfront,
> basically it's just a list of email addresses.  Here's the syntax I'm using:
> 
> cdbmake-sv morevalidusers.cdb morevalidusers.tmp <
> /usr/local/src/kludge-scripts/mailfront-inputfile
> 
> Contents of mailfront-inputfile:
> 
> [root@mercury /usr/local/src/kludge-scripts]$ cat -A mailfront-inputfile
> [email protected]$
> [email protected]$
> [email protected]$
> [email protected]$

cdbmake-sv expects lines of the form "foo x/y"

i think what you want is

	awk '{printf"+%d,0:%s->\n", length($1), $1} END {print""}' <mailfront-inputfile | cdbmake morevalidusers.cdb  morevalidusers.tmp

or some such