Re: [Exim] List-separator of null character?

Top Pagina
Delete this message
Reply to this message
Auteur: Phil Pennock
Datum:  
Aan: exim-users
Onderwerp: Re: [Exim] List-separator of null character?
On 2003-08-06 at 09:54 +0100, Philip Hazel wrote:
> On Tue, 5 Aug 2003, Phil Pennock wrote:
> > We put lots of data into CDB files. We do extractions, no problem. But
> > the list separator remains a colon, or can be set to any other
> > character;
>
> I don't understand what you are saying here.


Unsurprising. I knew what I meant, but didn't put enough work into how
I described the issue, to make sure that readers could understand things
without having read the whole mail first. Stupid of me -- this is very
basic English writing skills ...

Yeah, all the CDB stuff works just fine. Anything there, I can control.
It's how Exim uses the results, when they're intended as a list.

> [Aside: Note that in Exim's lsearch lookups, you can use quotes to get
> colons into keys:
>
> "this:key:contains:colons": this is the data


Could I do something similar with an address list?

> > I'd really like to be able to say something like:
> >
> >    local_parts = <\0 $domain_data

>
> Aha. I see the problem. I'm afraid you can't do that. So you have to
> pick *some* separator for the items in your list. If you want to be
> clever, you could use some string that is more than one character long,
> and hopefully unlikely to occur. As someone suggested, perhaps 8-bit
> characters are the answer here. Then use some string expansion trickery
> to (a) convert colons in the actual data to double colons and then (b)
> convert your magic strings into colons. (Or whatever you want instead of
> colons.) However, you can't have binary zeros anywhere, sadly.
>
> An alternative would be make $domain_data expand into another lookup
> rather than an actual list.


If I change the scripts which build CDBs so that, for literal string
left-hand-sides, the individual parts have double-quotes wrapped around
them if that part contains special characters, would that be even likely
to work?

So, something like:

CDB file, key->value:
example.org -> fred:"foo:bar":barney

and then:

local_parts = $domain_data

Should that match correctly?

My only real concern then would be a lesser one -- that I'd be changing
the CDB files from:

* contain information about how email is handled
* happens to be used by Exim

to

* contain information about how Exim should handle email

Thanks,
--
2001: Blogging invented. Promises to change the way people bore strangers with
banal anecdotes about their pets. <http://www.thelemon.net/issues/timeline.php>