Hi Sönke
to check for aliases we use the following ldap-config-file for postfix
2.5.6:
# virtual_mailbox_maps = ldap:/etc/postfix/ldap-aliases.cf
server_host = ldaphost.mydomain.com
server_port = 389
search_base = ou=postfix,dc=mydomain,dc=com
query_filter = (&(mail=%s)(objectclass=qmailuser))
result_attribute = mailAlternateAddress
bind = yes
bind_dn = cn=postfix,ou=postfix,dc=mydomain,dc=com
bind_pw = XXXXXXXX
scope = one
version = 3
suomi
On 2010-12-02 11:28, Sönke Schwardt-Krummrich wrote:
Hi!
I'm using postfix 2.5 and configured LDAP as lookup table for my virtual map
like this:
ldapvirtualfoobar_server_host = ldap://myserver:389
ldapvirtualfoobar_search_base = dc=my,dc=ldap,dc=base
ldapvirtualfoobar_query_filter = (&(objectClass=someClass)(someAttribute=%s))
ldapvirtualfoobar_result_attribute = mail
ldapvirtualfoobar_result_filter = %s
The main problem is that "mail" is a multivalue attribute and nearly all of
the found LDAP objects contain multiple values for "mail". In this case the
incoming mail gets duplicated. "size_limit=1" does only limit the number of
found LDAP objects per LDAP query (which is always 1 in my case).
"expansion_limit=1" causes a temporary error if more than one mail address is
returned during lookup.
Is there any way to return only one address by LDAP query if result_attribute
is a multivalue attribute? It doesn't matter which one of the values is
returned.
The more I read the docs I get the feeling that it's currently not possible
but maybe you know a less-known/undocumented trick.
Thanks in advance
Sönke