Re: [Exim] Subkey queries and ldap

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: michael
Data:  
Para: ph10
CC: exim-users
Assunto: Re: [Exim] Subkey queries and ldap
> 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.)


Please document that in the manual. Right now I am not sure if the LDAP
URL syntax forbids any colons after the "ldap:" part. If so, adding subkey
queries might be easy.

> > 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).


I didn't either and that bug is also within the code I sent you. ;-)

> > 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.)


Yes, you can specify which attributes you want as part of the LDAP URL.
In my case, I had two lookups of the same DN and each requested a different
attribute. Using the same URL that requests both attributes would have
satisfied the second lookup from the exim lookup cache and I was curious
about a possible performance win. The lookups get that unreadable using
extract, though, that I would rather not use it unless neccesary.

> 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.


I hacked my copy, but if nothing else helps, I could checkout the current
release and send you a tar file.

Michael