Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-04-2009, 03:01 AM
Junior Member
 
Posts: 6
Default local_recipient_maps for a ldap search on a postfix server before zimbra

Hello,

For some reasons, we have a relay server before zimbra. It is based on postfix. I want to configure on that relay server the local_recipient_maps to search into the ldap of the zimbra server. The purpose is rejecting mails sent to unknown users before relaying them to the zimbra server.
Currently, I need to manually add a local user on that relay server...

So here is my config on the relay serveur (postfix postfix-2.1.5-5) :
- in the main.cf
local_recipient_maps = ldap:/etc/postfix/ldap-localusers.cf
- in the ldap-localusers.cf
server_host = zimbra.pcsol.be
search_base = ou=people,dc=pcsol,dc=be
query_filter = (&(mail=%s)(zimbraMailStatus=enabled))
result_atribute = uid
version = 3
But when I try to test these settings with postmaps command, I get no output :
postmap -q 'info' ldap:/etc/postfix/ldap-localusers.cf

Someone already tried such a config? Or have an idea on my misconfiguration?

Thanks,
nm
Reply With Quote
  #2 (permalink)  
Old 09-04-2009, 03:17 AM
Moderator
 
Posts: 7,928
Default

Yep have it running here with a front-end Postfix/Mailscanner server

The way I did it was to pretty much copy the ZCS postfix setup. So in /etc/postfix/main.cf I put
Code:
sender_canonical_maps = proxy:ldap:/etc/postfix/ldap-scm.cf
virtual_alias_domains = proxy:ldap:/etc/postfix/ldap-vad.cf
virtual_alias_maps = proxy:ldap:/etc/postfix/ldap-vam.cf
virtual_mailbox_maps = proxy:ldap:/etc/postfix/ldap-vmm.cf
virtual_mailbox_domains = proxy:ldap:/etc/postfix/ldap-vmd.cf
transport_maps = proxy:ldap:/etc/postfix/ldap-transport.cf
And copied those files across from the ZCS server. I then needed to update each of the .cf files and change the variables server_host, bind_dn and bind_pw.
__________________
Reply With Quote
  #3 (permalink)  
Old 09-04-2009, 04:05 AM
Junior Member
 
Posts: 6
Default

Thank you for posting.

If I add the "proxy:" before the "ldap:" as in the zimbra config in that command :
postmap -q 'info' proxy:ldap:/etc/postfix/local_users_test.cf
I get this error :
postmap: fatal: proxymap service is not configured for table "ldap:/etc/postfix/local_users_test.cf"
If I remove the "proxy:"
postmap -q 'info' ldap:/etc/postfix/local_users_test.cf
I then get this error :
postmap: error: dict_ldap_connect: Unable to set STARTTLS: -11: Connect error
Do you need to copy the ca files or create new ones?

I didn't understand why you needed to change the bind_dn and bind_pw. Those in the zimbra config files don't work?
Reply With Quote
  #4 (permalink)  
Old 09-04-2009, 04:09 AM
Moderator
 
Posts: 7,928
Default

Yes the passwords do not need to change ... and you will also need to copy across the CA files from /opt/zimbra/conf/ca.
__________________
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.