Hello,
I am trying to setup a postfix mailserver using a Samba4 AD server as
the LDAP source and I am struggling with groups.
I have created an OU called domains and then created a mailgroup called
example.com in this OU, I then added added a mail attribute
mailgr...@example.com to the group
This is the postfix .cf file that I am using to try to obtain the email
addresses of the users.
/etc/postfix/ldap/ad_virtual_group_maps.cf
server_host = myadserver.example.com
server_port = 389
version = 3
bind = yes
start_tls = no
bind_dn = cn=vmail,cn=Users,dc=example,dc=com
bind_pw = Passw0rd*
search_base = ou=domains,dc=example,dc=com
scope = sub
query_filter = (&(objectclass=group)(mail=%s))
leaf_result_attribute = otherMailbox
special_result_attribute = member
debuglevel = 0
I have added a couple of otherMailbox attributes to a user called fred,
one is f...@example.com, the other is f...@anotherdomain.com. I then
added fred to the example.com group.
I then ran this command:
postmap -q mailgr...@example.com
ldap:/etc/postfix/ldap/ad_virtual_group_maps.cf
This is where the problem comes in, I expected to just get back
f...@example.com, but instead I get f...@example.com and
f...@anotherdomain.com
Is there any way I can just get f...@example.com i.e. just where have I
made my mistake. I have tried trawling the internet, but everything that
I can find seems to say that I am doing the right thing, but I must be
doing something wrong.
TIA
Rowland