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 [email protected] 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 [email protected], the other is [email protected]. I then added fred to the example.com group.

I then ran this command:

postmap -q [email protected] ldap:/etc/postfix/ldap/ad_virtual_group_maps.cf

This is where the problem comes in, I expected to just get back [email protected], but instead I get [email protected] and [email protected]

Is there any way I can just get [email protected] 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

Reply via email to