Re: [exim] ldap returned data format

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: Jeremy Harris
CC: exim-users
Subject: Re: [exim] ldap returned data format
On 2008-01-13 at 15:28 +0000, Jeremy Harris wrote:
> How should one deal with multi-valued attributes in ldap,
> where an attribute could contain a comma?


Depends what you do with it.

> The spec says
> "If the attribute has multiple values, they are separated by commas."
> Actually I see "comma, space" - but while this is less likely to
> appear in an attribute value it still isn't impossible
> (I want to hold regexes, among other things).


Exim requires you to quote at the point of use, since different services
require different quoting. So there are ${quote_foo:...} expansion
operators for various foo. For Exim's own parsing, ${quote:...} is
useful, for putting the string into double-quotes as needed.

> ${lookup ldap{ldap:///ou=People,dc=spodhuis,dc=org?objectClass?sub?cn=Phil%20Pennock}}

inetOrgPerson, posixAccount, top
> ${quote:${lookup ldap{ldap:///ou=People,dc=spodhuis,dc=org?objectClass?sub?cn=Phil%20Pennock}}}

"inetOrgPerson, posixAccount, top"

-Phil