Dear André,

instead of
result_attribute = mail
use
leaf_result_attribute = mail

Best
Carsten


-- André Schild wrote (23.04.2013 15:30) --
> Hello,
> 
> since mails sent to ldap groups must be expanded by the mta,
> I tried to come up with a working configuration.
> 
> It works (almost), the problem I actually see, is that postfix expands
> the recipients to all members, BUT then also adds the email address of
> the group to the list.
> In this case grup...@aarboard.ch
> 
> 
> Here the group expanding in postfix:
> 
> server_host = 192.168.202.11
> search_base = ou=aarboard.ch,ou=groups,o=mailhosting2,dc=aarboard,dc=ch
> query_filter = (&(mail=%s)(objectclass=groupOfUniqueNames))
> result_attribute = mail
> special_result_attribute = uniquemember
> 
> 
> And the associated ldap entries:
> 
> LDAP Group:
> 
> dn: cn=Gruppe1,ou=aarboard.ch,ou=groups,o=mailhosting2,dc=aarboard,dc=ch
> objectClass: extensibleObject
> objectClass: top
> objectClass: groupOfUniqueNames
> cn: Gruppe1
> uniqueMember:
> mail=a.sch...@aarboard.ch,jvd=aarboard.ch,o=mailhosting2,dc=aa
>  rboard,dc=ch
> uniqueMember:
> mail=a.schi...@aarboard.ch,jvd=aarboard.ch,o=mailhosting2,dc=a
>  arboard,dc=ch
> mail:grup...@aarboard.ch
> 
> And the LDAP - Mailusers
> 
> dn:
> mail=a.schi...@aarboard.ch,jvd=aarboard.ch,o=mailhosting2,dc=aarboard,dc
>  =ch
> objectClass: JammMailAccount
> objectClass: top
> accountActive: TRUE
> delete: FALSE
> homeDirectory: /home/vmail/domains
> lastChange: 1366702070
> mail: a.schi...@aarboard.ch
> mailbox: aarboard.ch/a.schild2/
> 
> and
> 
> dn:
> mail=a.sch...@aarboard.ch,jvd=aarboard.ch,o=mailhosting2,dc=aarboard,dc=
>  ch
> objectClass: JammMailAccount
> objectClass: top
> accountActive: TRUE
> delete: FALSE
> homeDirectory: /home/vmail/domains
> lastChange: 1304579374
> mail: a.sch...@aarboard.ch
> mailbox: aarboard.ch/a.schild/
> 
> 
> Already the postmap command shows the wrong number of results:
> 
> postmap -v -q grup...@aarboard.ch ldap:/etc/postfix/expand_groups.cf
> returns:
> postmap: dict_ldap_lookup: In dict_ldap_lookup
> postmap: dict_ldap_lookup: No existing connection for LDAP source
> /etc/postfix/expand_groups.cf, reopening
> postmap: dict_ldap_connect: Connecting to server ldap://192.168.202.11:389
> postmap: dict_ldap_connect: Actual Protocol version used is 2.
> postmap: dict_ldap_connect: Binding to server ldap://192.168.202.11:389
> as dn
> postmap: dict_ldap_connect: Successful bind to server
> ldap://192.168.202.11:389 as
> postmap: dict_ldap_connect: Cached connection handle for LDAP source
> /etc/postfix/expand_groups.cf
> postmap: dict_ldap_lookup: /etc/postfix/expand_groups.cf: Searching with
> filter (&(mail=grup...@aarboard.ch)(objectclass=groupOfUniqueNames))
> postmap: dict_ldap_get_values[1]: Search found 1 match(es)
> postmap: dict_ldap_get_values[1]: looking up DN
> mail=a.sch...@aarboard.ch,jvd=aarboard.ch,o=mailhosting2,dc=aarboard,dc=ch
> postmap: dict_ldap_get_values[2]: Search found 1 match(es)
> postmap: dict_ldap_get_values[2]: search returned 1 value(s) for
> requested result attribute mail
> postmap: dict_ldap_get_values[2]: Leaving dict_ldap_get_values
> postmap: dict_ldap_get_values[1]: looking up DN
> mail=a.schi...@aarboard.ch,jvd=aarboard.ch,o=mailhosting2,dc=aarboard,dc=ch
> postmap: dict_ldap_get_values[2]: Search found 1 match(es)
> postmap: dict_ldap_get_values[2]: search returned 1 value(s) for
> requested result attribute mail
> postmap: dict_ldap_get_values[2]: Leaving dict_ldap_get_values
> postmap: dict_ldap_get_values[1]: search returned 2 value(s) for special
> result attribute uniqueMember
> postmap: dict_ldap_get_values[1]: search returned 1 value(s) for
> requested result attribute mail
> postmap: dict_ldap_get_values[1]: Leaving dict_ldap_get_values
> postmap: dict_ldap_lookup: Search returned
> a.sch...@aarboard.ch,a.schi...@aarboard.ch,grup...@aarboard.ch
> a.sch...@aarboard.ch,a.schi...@aarboard.ch,grup...@aarboard.ch
> 
> 
> Any ideas what might be wrong or how I can remove the group-email from
> the group itself?
> 
> 
> With best regards
> 
> André Schild
> 

-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Reply via email to