On Tue, Dec 13, 2022 at 11:23:55AM +0800, luckydog xf wrote:

> # Here is my ldap query
> bind = no
> version = 3
> server_host = ldap://172.16.232.201:389
> start_tls = no
> search_base = cn=users,cn=accounts,dc=ipa,dc=pthl,dc=hk
> scope = sub
> query_filter = (|(displayName=%s)(initials=%s))
> result_attribute = displayName, initials
> result_format = %s

In a well-designed email LDAP schema there are two single-valued valued
attributes for each user (atribute names may vary, but the semantics
remain the same):

    * mail
        - primary (canonical) email address of the user

    * mailRoutingAddress (sometimes "maildrop", ...)
        - The routing address of the underlying mailbox.

There are then also frequently multi-valued attributes that
hold one or more email addresses under which the user receives mail:

    * mailAlternateAddress (or with "smtp:" prefix proxyAddresses, ...)
        - All or additional to "mail" addresses.


See LDAP_README for examples.

    https://www.postfix.org/LDAP_README.html

> How to return the only one based on query input?  E.g when the user's
> input is u...@abc.com, it returns u...@abc.com, vice versa.

See ldap_table(5) for the supported result format syntax, this describes
some selectors based on the key rather than the lookup result

    https://www.postfix.org/ldap_table.5.html

-- 
    Viktor.

Reply via email to