No, LDAP is fine. It's simply returning a list of UID's assigned to the user, i.e. testuser, and test.

What I need to figure out is how to tell postfix by the result_format? to only return 1 entry when that entry is found.

I.e. Incoming email to [EMAIL PROTECTED], postfix/ldap looks up our directory service and sees that uid=testuser is within the directory as well as uid=test, instead of returning both uid's I only want the postfix/ldap query to return the uid originally sent too it, i.e. testuser.

Does that make sense?

Regards,
Michael Pasqualone

On 26/10/2008, at 11:51 PM, Reinaldo de Carvalho wrote:


I have an ldap query returning alias_maps via
ldap:/etc/postfix/ldap-aliases.cf which for the most part is working.

ldap-aliases.cf contains:
      server_host = directory.abcd.com.au
      search_base = dc=abcd,dc=com,dc=au
      version = 3
      query_filter = (uid=%u)
      result_attribute = uid
      result_format = [EMAIL PROTECTED]
      bind = no

For our 200 users, this works fine - however we have a small number (<10) of
users who have multiple UIDs, for example:
# postmap -q [EMAIL PROTECTED] ldap:/etc/postfix/ldap- aliases.cf
      [EMAIL PROTECTED],[EMAIL PROTECTED]

The question is, how do I *only* return [EMAIL PROTECTED] as the result
and not the 2nd (or 3rd, 4th, etc) result?


...
Regards,
Michael Pasqualone


Fix ldap data. You have two entries with uid=testuser. Mail will be
delivered for all results.

--
Reinaldo de Carvalho
http://korreio.sf.net
http://python-cyrus.sf.net

Reply via email to