On Wed, Jun 10, 2009 at 12:42:12PM +1200, Kevin Sartorelli wrote:

> > Why on earth are there multiple accounts with the same primary mail address?
> > Or is the "mail" attribute of the user in question multi-valued? (Also
> > not a good idea).
>
> Simple answer - user error.  There shouldn't be but I have no control
> over what goes into the LDAP directory.  While there shouldn't be any
> duplicate email addresses there are and I tripped over one in testing.
> Guess I want to handle this case in a graceful manner rather than
> deferring until it is noticed or times out.

Sorry, there is no support in the Postfix LDAP driver for ignoring spurious
additional results.

> >> My reading of the ldap_table man page indicates that this will happen
> >> for the 'expansion_limit' parameter, but not the 'size_limit' parameter.
> > A limit is a limit.
>
> I was hoping it would only return 1 entry rather than error if there
> was more than one.

No, that would lead to unpredictable behaviour because the result order
is not specified. I know that in your case the result is independent of
returned value, but this special case is not specifically singled-out.

> > If you want a single result, use a query that always returns exactly
> > one value, meaning, exactly one matching "entry" with a *single-valued*
> > result attribute.
>
> OK, thanks.  Wish I had more control over the contents of the LDAP I
> have to look in.

LDAP server schemas in some cases have the ability to specify that certain
attributes must be unique across all entries. Administrator error can
be prevented if you make use of any support for such constraints.

We use LDAP, and don't have collisions of primary or secondary addresses
across users.

-- 
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[email protected]?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Reply via email to