Results 1 to 3 of 3

Thread: Using ldap zimbra in another postfix server

  1. #1
    Join Date
    Oct 2010
    Posts
    22
    Rep Power
    5

    Default Using ldap zimbra in another postfix server

    I have to servers, an old server with a postfix configured by hand and a new server with zimbra.

    I have been trying to connect the postfix in the old server to the ldap zimbra db but not success.

    Installing zimbra in the other one is not a solution i just want to use the same users db.

  2. #2
    Join Date
    Oct 2010
    Posts
    22
    Rep Power
    5

    Default

    Another thing testing the ldapsearch is successfull i can see all the users, but when connecting the postfix to the ldap i have not had success.

  3. #3
    Join Date
    Oct 2010
    Posts
    22
    Rep Power
    5

    Default

    Thanks to all but i already solved it, the problem resides in the filter i was using. Now i will explain how to do it.

    I am using debian so I edit /etc/default/saslauthd
    Code:
    MECHANISMS="ldap"
    MECH_OPTIONS="/etc/saslauthd.conf"
    Then i move the saslauthd directory to be read by postfix chroot environment:
    Code:
    mv  /var/run/saslauthd/ /var/spool/postfix/var/run/
    ln -s /var/spool/postfix/var/run/saslauthd  /var/run/
    adduser postfix sasl
    Then I create /etc/saslauthd.conf
    Code:
    # LDAP
    # --
    ldap_servers: ldap://$iphost/
    ldap_bind_dn: uid=zmpostfix,cn=appaccts,cn=zimbra
    ldap_bind_pw: $passwordzimbra
    ldap_auth_method: bind
    ldap_filter: (&(|(uid=%u)(zimbraMailDeliveryAddress=%u)(zimbraMailAlias=%u))(zimbraMailStatus=enabled))
    #ldap_search_base: uid=user,ou=people,dc=dominio,dc=com
    #ldap_scope: base
    ldap_timeout: 15
    #-------------- FIN
    In this section i was using the zimbra filter with %s and not %u, i changed and everything came out easy, i mean i was using the filter in the ldap-vam.cf of the zimbra conf file, changing the %s by %u solve the problem.


    Then i run the saslauthd for testing purpose
    Code:
    # /usr/sbin/saslauthd -a ldap -O /etc/saslauthd.conf -c -m /var/run/saslauthd -n 5 -d
    and then in a new console i run
    Code:
    # testsaslauthd -u user -p freedom
    0: OK "Success."
    Then i edit /etc/postfix/sasl/smtpd.conf
    Code:
    log_level: 3
    pwcheck_method: saslauthd
    mech_list: plain ntlm cram-md5 login digest-md5
    auxprop_plugin: ldap
    Stop saslauthd and run everything:
    Code:
    /etc/init.d/saslauthd stop;/etc/init.d/saslauthd start;/etc/init.d/postfix stop; /etc/init.d/postfix start
    I make a Auth Plain test code:
    Code:
    # echo "AUTH PLAIN "`perl -MMIME::Base64 -e 'print encode_base64("user\0user\0freedom");'`
    AUTH PLAIN dXNlcgB1c2VyAGZyZWVkb20=
    I copy the output and try the telnet
    Code:
    # telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 mail.dominio.com ESMTP Postfix (Debian/GNU)
    AUTH PLAIN dXNlcgB1c2VyAGZyZWVkb20=
    235 2.7.0 Authentication successful
    Last edited by rojoblandino; 08-05-2011 at 10:41 PM.

Similar Threads

  1. Replies: 12
    Last Post: 03-23-2011, 09:39 PM
  2. Replies: 21
    Last Post: 02-04-2010, 09:06 AM
  3. Replies: 22
    Last Post: 12-02-2007, 04:05 PM
  4. huge log size
    By rmvg in forum Administrators
    Replies: 5
    Last Post: 01-02-2007, 09:39 AM
  5. Mail logs
    By Rick Baker in forum Installation
    Replies: 8
    Last Post: 01-17-2006, 03:33 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
  •