republican-creole
site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
639
Share Topic
Posting?
Post a:
Post a:
Links: ·Forum FAQ ·Attitude Adjustment ·Linux docs ·DistroWatch ·OPLM ·FreeBSD Handbook
AuthorAll Replies


PToN

join:2001-10-04
Houston, TX

Postfix+Dovecot+LDAP - Virtual Users

Hello,

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


PToN

join:2001-10-04
Houston, TX

reply to PToN
Well, i just irresponsibly went ahead and tried it and i found out it does work.

It is possible to define multiple LDAP virtual_mailbox_maps

Thanks for looking


Sunday, 03-Jun 18:20:19 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics