Topic: How to Active Directory Aliases
==== Required information ====
- iRedMail version (check /etc/iredmail-release): iRedMail-0.9.5-1
- Linux/BSD distribution name and version: Ubuntu 14.04.4 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Windows 2003 Active Directory
- Web server (Apache or Nginx): Apache/2.4.7 (Ubuntu)
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: as follows...
====
Hi!
Could you please, kindly tell me how does aliases work when using AD?
Here's what I did so far:
file /etc/postfix/ad_virtual_mailbox_maps.cf
server_host = myadserver.mydomain
server_port = 389
version = 3
bind = yes
start_tls = no
bind_dn = aduser@mydomain
bind_pw = aduserpasswd
search_base = cn=users,dc=mydomain
scope = sub
query_filter = (&(objectclass=user)(!(useraccountcontrol:1.2.840.113556.1.4.803:=2))(|(userPrincipalName=%s)(mail=%s)(othermailbox=%s)))
result_attribute= userPrincipalName
result_format = %d/%u/Maildir/
debuglevel = 0
I also tried with:
... same config as above
result_attribute= mail
... same config as above
The otherMailBox attribute contains user's aliases in my AD.
For example:
user1@mydomain, has aliases xpto@mydomain, xyz@mydomain and so on...
To test if it is working, I've issued the command:
postmap -q xpto@myadomain ldap:/etc/postfix/ad_virtual_mailbox_maps.cf
It returned:
mydomain/user1/Maildir/
which is correct, because xpto is a user1 alias.
But when I try send an e-mail from Roundcube or SOGo, it returns an error, saying "User unknown".
What did I miss?
Thank you!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.