Re: [Exim] Ip address list 2 cdb

Top Page
Delete this message
Reply to this message
Author: Marc MERLIN
Date:  
To: Sheldon Hearn, Karl Schmidt
CC: Exim (E-mail)
Subject: Re: [Exim] Ip address list 2 cdb
On Mon, Oct 01, 2001 at 01:14:09PM +0200, Sheldon Hearn wrote:
> Your question is answered in the documentation supplied with Exim. The
> following is quoted from the Exim Specification:
>
>     http://www.pobox.com/~djb/cdb.html


I actually recommend freecdb, which is open source (DJB's stuff isn't)

On Mon, Oct 01, 2001 at 03:23:38PM -0500, Karl Schmidt wrote:
> Yes I understand that BUT -
>
> What form of data base does Exim expect?
>
> What would the key name be?


Here's what I wrote:
----------------------------------------------------------------------------
kenny:/etc/mail/virtualdomains# cat aliastocdbsrc
#!/usr/bin/perl -w

use strict;

die "$0 < infile > outfile\n" if $#ARGV != -1;

while ($_=<STDIN>)
{
    next if (/^#/);
    next if (/^\s*$/);


    /^(.+?)\s*:\s*(.+?)\s*$/ or die "Can't split $_\n";


    print "+".length($1).",".length($2).":$1->$2\n";
}


# cdbmake requires an extra newline...
print "\n";
----------------------------------------------------------------------------

----------------------------------------------------------------------------
kenny:/etc/mail/virtualdomains# cat Makefile
ZONES=$(wildcard src/*)
CDBZONES=$(shell echo $(ZONES) | sed "s/src\//cdb\//g")

all: $(CDBZONES)

cdb/%:  src/%
        @echo "Rebuilding cdb file for $@"
        @cat $? | ./aliastocdbsrc | cdbmake $@ $@.tmp
----------------------------------------------------------------------------


A single entry would look like this:
+4,19:root->merlin@???

In your case, you'd have keys pointing to nothing I guess.

Marc
-- 
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking


Home page: http://marc.merlins.org/ | Finger marc_f@??? for PGP key