Re: [Exim] Lookup using fifth field as key

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Steve Haslam
Fecha:  
A: exim-users
Asunto: Re: [Exim] Lookup using fifth field as key
On Wed, Jan 12, 2000 at 12:03:09AM -0000, Jonathan Hunter wrote:
> Is this feasible at all, or is it more sensible to use embedded Perl? I
> suspect lsearch might not like the colons used in /etc/passwd as field
> seperators, thus necessitating a new search type to be written. If I do
> write a new search type, are there any coding standards to follow for
> inclusion in the next Exim distribution if other people want it?


You could use embedded Perl, but personally I'd write a cron script to
generate a .cdb file periodically from /etc/passwd and use that. That
means the cron script could do things like notifying you about new
collisions, or any other processing you feel it necessary to add
later.

> Or (hopefully) have I missed something obvious and is there a much
> simpler way of achieving this? I would like to avoid generating an
> aliases file from /etc/passwd every so often, as that's just
> duplicating existing information...


Note to self: I will read an entire email before replying to it.

OK, I see your point about the extra information, but IMHO the
advantages of generating an index outweigh that.

After all, the index in the back of a book doesn't provide extra
information does it? That doesn't mean it isn't dead useful.

SRH
-- 
Steve Haslam, Production Engineer, Excite UK     steve.haslam@???
                               i sit and stare at the gun pointed at my head
                                       and think about all the possibilities