"Marco Rebsamen" <mrebsa...@unimatrix0.ch> wrote in message news:f70fd6682c026e40970a322e98e764545...@tranceiver.hive.loc... Hello Everybody
I wan't to have my local recipeints checked against my Active Directory. So I have created the .cf file with the LDAP parameters: bind_dn = u...@domain.local bind_pw = ****** server_host = 192.168.8.254 #Global Catalog port server_port = 3268 search_base = DC=domain, DC=local query_filter = proxyAddresses=*%s* and changed the main.cf file: local_recipient_maps = ldap:/etc/postfix/local_recipient_maps.cf unix:passwd.byname If i do this now: postmap -v -q 'u...@domain.ch' ldap:/etc/postfix/local_recipient_maps.cf It tells me "Search found 1 match(es)". But If i try to deliver a message with the same address postfix tells me "User not known in local recipient maps" How can i figure out whats wrong ? Thanks The following has worked for me. Don't know if it is the best way or not. Step 1 Create a user in Active Directory for Postfix to use. First name = postfix Lastname = User Logon Name = postfix User cannot change password Password never expires Step 2 Add the following to the /etc/postfix/main.cf: # Prevents mail from being sent to local user accounts local_transport = virtual # Information about mailboxes virtual_mailbox_base = /var/postfix/maildirs/ virtual_mailbox_maps = ldap:/etc/postfix/ldap_mailboxes.cf virtual_minimum_uid = 501 virtual_uid_maps = static:501 virtual_gid_maps = static:502 # Files storing user and group information virtual_maps = ldap:/etc/postfix/ldap_users.cf, ldap:/etc/postfix/ldap_groups.cf Step 3 Create /etc/postfix/ldap_mailboxes.cf server_host = ldap://mail.testcompany.com:389 version = 3 search_base = cn=users,dc=testcompany,dc=com query_filter = (&(mail=%s) (objectClass=user)) result_attribute = samaccountname result_format = %s/ bind_dn = postfix bind_pw = DFD321 Step 4 Create /etc/postfix/ldap_users.cf server_host = ldap://mail.testcompany.com:389 version = 3 search_base = cn=users,dc=testcompay,dc=com query_filter = (&(mail=%s) (objectClass=user)) result_attribute = samaccountname bind_dn = postfix bind_pw = DFD321 Step 5 Create /etc/postfix/ldap_groups.cf server_host = ldap://mail.testcompany.com:389 version = 3 search_base = ou=mail_groups,dc=testcompay,dc=com query_filter = (&(mail=%s) (objectClass = group)) special_result_attribute = member leaf_result_attribute = mail bind_dn = postfix bind_pw = DFD321 Once you get this working, you will need to think about ssl encryption between the Linux box and the Windows box.