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: em...@alias.tld" (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 alias@foo.local 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

I am using this configuration on lots of servers and it's working flawlessy.

Hope that helps a bit...

Regards
Peter


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

Reply via email to