> Dňa 11.9.2015 o 12:38, Peter Beck <[email protected]> napísal: > > On 09/11/2015 12:15 PM, Gary Richards wrote: >> I'm assuming that this means, you can configure email aliases in a >> fairly correct way within sambas directory? If that's the case, how >> might you go about doing it? Ideally you would even be able to configure >> them using the standard Windows management tools :) > > Hi Gary, > > I'm also using aliases with Samba4. just add as much "otherMail" entries > you need to the account. I'm doing it via ldbedit: > > ldbedit -H /var/lib/samba/private/sam.ldb '(sAMAccountName=username)' > > then just add "otherMail: [email protected]" (without quotes) and save it. > > For Postfix I've added an extra query to main.cf: > > virtual_alias_maps = hash:/etc/postfix/virtual_aliases, > ldap:/etc/postfix/ldap_groups, ldap:/etc/postfix/ldap_users > > and the corresponding ldap queries looks like that (ensure you've > installed the postfix-ldap package): > > server_host = samba4-address > search_base = dc=domain,dc=local > version = 3 > bind = yes > bind_dn = cn=LDAP Service,cn=users,dc=domain,dc=local > bind_pw = secretpassword > scope = sub > query_filter = (&(objectclass=user)(otherMailbox=%s)) > result_attribute = mail > > you can test your aliases with postmap: > > postmap -q [email protected] ldap://etc/postfix/ldap_users > > this should show you the "real"/main adress which will be used for delivery. > > btw: > the group query looks similar to the user query, but with some settings: > query_filter = (&(objectclass=group)(|(mail=%s)(otherMailbox=%s))) > leaf_result_attribute = mail > special_result_attribute = member >
Hi, This is precisely what I am doing. Only to add, that indeed you can use standard Windows management tools to manage users / aliases, in this case I use ADSI edit to work on “otherMailbox” LDAP attribute. Regards Martin. -- [email protected] https://inverse.ca/sogo/lists
