 PToN join:2001-10-04 Houston, TX | Postfix+Dovecot+LDAP - Virtual UsersHello,
I have this setup for a very long time now. Everything is working fine, however, we are adding a new domain to replace the old domain. I have migrated the Active Directory accounts and the only problem i found was that i had to add a new ldap config to dovecot in order to search the new domain.
Up until now all the accounts created in the new domain worked without any problems. And today i found out that it was because coincidentally the email addresses matched old, no longer active AD accounts from past employees with similar names.
Now, there is a name that Postfix cannot find and it is because it just isnt there.
My question is, how can i add multiple ldap servers with different bind accounts, search base, filters, etc to Postfix virtual_mail_box...???
Currently my postfix looks like this: (relevant parts only)
virtual_mailbox_domains = $mydomain
virtual_mailbox_base = /srv/mail/vmail/
virtual_mailbox_maps = ldap:/etc/postfix/ldap_users.cf
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
alias_maps = hash:/etc/aliases
mailbox_transport = dovecot
virtual_transport = dovecot
/etc/postfix/ldap_users.cf:
server_host = 192.168.50.30 192.168.50.31
search_base = dc=domain,dc=com
version = 3
query_filter = (&(objectclass=person)(mail=%s))
result_attribute = samaccountname
result_format = %s/Maildir/
bind = yes
bind_dn = cn=ldap,cn=Users,dc=domain,dc=com
bind_pw = password
With Dovecot, i was just able to create a new file and change the hostname, bind account and add the file to main config so that if not found in the first search, it would try to find it on the second one. So with dovecot, i have 2 ldap files: old-domain_ldap.conf and new-domain_ldap.conf.
Is this possible to do with postfix??
I cannot completely change the current postfix ldap since there are some accounts that still on the old domain.
Thanks |
 PToN join:2001-10-04 Houston, TX | Basically what i would like to do is:
virtual_mailbox_maps = ldap:/etc/postfix/ldap_users-old-domain.cf, ldap:/etc/postfix/ldap_users-new-domain.cf
possible?? I found someone else's config that listed 2 config files for this attribute, but i would like to see if anyone else has done it or knows if it works or not..
Thanks |