Results 1 to 4 of 4

Thread: local_recipient_maps for a ldap search on a postfix server before zimbra

  1. #1
    Join Date
    May 2009
    Posts
    6
    Rep Power
    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

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    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.

  3. #3
    Join Date
    May 2009
    Posts
    6
    Rep Power
    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?

  4. #4
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    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.

Similar Threads

  1. [SOLVED] Moving Zimbra to a new server
    By krolen in forum Administrators
    Replies: 109
    Last Post: 02-05-2009, 10:38 AM
  2. zmtlsctl give LDAP error
    By sourcehound in forum Administrators
    Replies: 5
    Last Post: 03-11-2007, 03:48 PM
  3. dspam logrotate errors
    By michaeln in forum Users
    Replies: 7
    Last Post: 02-19-2007, 11:45 AM
  4. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 10:38 AM
  5. Zimbra server crashed
    By goetzi in forum Administrators
    Replies: 6
    Last Post: 03-25-2006, 12:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •