OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: virtual_maibox_maps, ldap lookups, and multiple attributes

From: ben thielsen (btbbitrate.net)
Date: Mon Feb 02 2009 - 19:02:55 CST


On Feb 02, 2009, at 06.15, Reinaldo de Carvalho wrote:

> On Mon, Feb 2, 2009 at 1:15 AM, ben thielsen <btbbitrate.net> wrote:
>> dn: uid=user,ou=people,ou=users,ou=accounts,dc=example,dc=com
>> mailLocalAddress: userfoo.com - delivered to foo.com/user/Maildir/
>> mailLocalAddress: userbar.net - delivered to bar.net/user/Maildir/
>> mailLocalAddress: ufoobar.org - delivered to foobar.org/u/Maildir/
>>
>> this works well for entries that contain only a single
>> mailLocalAddress
>> attribute, but not so well when multiple attributes exist. using
>> %U and %D
>> in the result_format value appeared to be a step in the right
>> direction, but
>> still returns more than one result, which suggested that there
>> might be a
>> more sensible approach. i also experimented with expansion_limit and
>> size_limit, neither of which appeared to change the outcome (aside
>> from
>> introducing failures).
>>
>
> in this case result_attribute must be single value.
>
> Example:
>
> mail: userfoo.com
> mailLocalAddress: userbar.net
> mailLocalAddress: ufoobar.org
>
> query_filter = (&(objectClass=inetLocalMailRecipient)(|
> (mailLocalAddress=%s)(mail=%s))(memberOf=cn=mail_recipients,dc=
> %d,ou=domains,ou=mail,dc=example,dc=com))
> result_attribute = mail
> result_format = %D/%U/Maildir/

ah! thank you, i understand the approach. please excuse my previous
message - i had missed this reply, originally, in my inbox.

-ben