Re: [Exim] Subkey queries and ldap

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: michael
CC: exim-users
Sujet: Re: [Exim] Subkey queries and ldap
On 7 Sep 2000 michael@??? wrote:

> The manual only describes subkey queries for single-key lookups, but
> the example uses nis+, a query lookup.


Subkeys are handled standardly by Exim only for single-key lookups. For
query-style lookups, the query language supported by the lookup may or
may not have this capability and in the case of NIS+, Exim adds the
ability to extract subfields itself. It does not do this for other forms
of query-style lookup. The reason is really that the syntax of queries
is so varied. (In the case of NIS+ the syntax is more regular.)

> Appearantly, subkeys don't work
> for ldap queries, so I thought, I could use extract. That does not work
> either, though, because ldap queries that return multiple results do not
> separate them by " " but by ", " (line 356 in ldap.c).


Oh dear. I guess I didn't notice that when I incorporated the LDAP code
into Exim (a long time ago).

>> Changing that to
> " " makes extract work properly. I guess this should be changed and the
> manual should describe what the result of such queries is, as it does
> with nis+.


Probably. You can work round it by using the ${sg translation option,
however.

> Still, ldap subkey queries would be more readable than using extract.


Isn't there a way of specifying the field you want in the LDAP query?
(Remember, I'm not an LDAP expert.)

When I am able to look at the LDAP patches you sent me (basically, when
I am able to get hold of the relevant source of OpenLDAP) I will think
about these issues.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.