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 - 18:50:26 CST


On Feb 01, 2009, at 23.58, Victor Duchovni wrote:

> On Sun, Feb 01, 2009 at 11:15:00PM -0500, ben thielsen 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).
>>
>> at first glance, it seems to me that being able to use % expansions
>> in the
>> result_attribute might get me what i'm after (e.g. result_attribute =
>> mailLocalAddress=%s or such), the idea being that only attributes
>> that
>> matched a particular value would be returned. since this isn't
>> possible
>> though, according to the ldap_table man page, i'm wondering how
>> else i
>> might achieve my goal, without requiring independent entries in
>> ldap for
>> each mailbox.
>
> Pick a single-valued attribute as the result_attribute.

i'm not able to conceive of a method of doing this that wouldn't use a
multi-valued attribute. what might be an example of how you guys
would accomplish such a goal? is my approach of wanting a human to
own multiple discrete mailboxes, yet not require separate ldap entries
fundamentally flawed?

-ben