Hey all,

Have a hopefully easy question that someone might be able to assist me with. I've got a postfix server integrated beautifully into an Apple Open Directory environment. However I've ran into 1 small issue.

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?

And since I know someone will ask, I have to match against UID and not maildrop, mail, etc, attitubes as they do not exist in our directory (and I do not have control, has to remain a pure Apple supported directory).

So basically, how do I construct the ldap query_filter, or result_format as such that it only returns the UID it basically matches within the query? So if UID=testuser and it matches someone's UID, then the result should only be [EMAIL PROTECTED] and not [EMAIL PROTECTED] ,[EMAIL PROTECTED]

If someone is able to give me a hand will be much appreciated!

Thanks!

Regards,
Michael Pasqualone

Reply via email to