I respond for myself. I forgot a "t" to the "result_atribute = mail" ...

Nicolas Michel a écrit :
I get the connection but I don't know why, I can't get a result :
postmap: dict_ldap_lookup: In dict_ldap_lookup
postmap: dict_ldap_lookup: No existing connection for LDAP source /etc/postfix/ldap-localusers.cf, reopening
postmap: dict_ldap_connect: Connecting to server ldap://zimbra.pcsol.be:389
postmap: dict_ldap_connect: Actual Protocol version used is 3.
postmap: dict_ldap_connect: Binding to server ldap://zimbra.pcsol.be:389 as dn
postmap: dict_ldap_connect: Successful bind to server ldap://zimbra.pcsol.be:389 as 
postmap: dict_ldap_connect: Cached connection handle for LDAP source /etc/postfix/ldap-localusers.cf
postmap: dict_ldap_lookup: Searching with filter (mail...@pcsol.be)
postmap: dict_ldap_get_values[1]: Search found 1 match(es)
postmap: dict_ldap_get_values[1]: Leaving dict_ldap_get_values
postmap: dict_ldap_lookup: Search returned nothing
postmap: dict_ldap_close: Closed connection handle for LDAP source /etc/postfix/ldap-localusers.cf
Here is the content of my ldap config file :
server_host = ldap://zimbra.pcsol.be:389
server_port = 389
search_base =
query_filter = (mail=%s)
result_atribute = mail
version = 3
And the postmap command I used :
postmap -v -q "n...@pcsol.be" ldap:/etc/postfix/ldap-localusers.cf


Someone know why I can't get a result from my search (that have 1 match ^^)?



-------- Message original --------
Sujet: Re: local_recipient_maps into an ldap
Date: Fri, 04 Sep 2009 08:55:36 +0200
De: Nicolas Michel <nicolas.mic...@lemail.be>
Pour :: postfix-users@postfix.org
Références: <4a9fa2a1.8030...@lemail.be> <20090903140523.gz31...@hn305c2n2.ms.com>


Victor Duchovni a écrit :
On Thu, Sep 03, 2009 at 01:04:01PM +0200, Nicolas Michel wrote:

  
   In that file (ldap-localusers.cf), I set this :

     server_host = zimbra.pcsol.be
     search_base = ou=people,dc=pcsol,dc=be
     query_filter = (&(mail=%s)(accountStatus=active))
     result_atribute = uid
     bind = no

   When I test that configuration with postmap I get no output, nothing. If I
   remove the "bind = no" line, I get an error :

     postmap -q '[1...@pcsol.be' ldap:/etc/postfix/ldap-localusers.cf
     postmap: warning: dict_ldap_connect: Unable to bind to server
     ldap://zimbra.pcsol.be:389 as : 2 (Protocol error)

   Do someone have an idea??
    

Try adding:

	version = 3

to the LDAP .cf file.

  
I think we are on a good way. I don't have any error anyway. But my postmap command give me back no output.
So I summarize. I have now that configuration into my 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
Here is an entry of my ldap server (got with ldapsearch) :
# info, people, pcsol.be
dn: uid=info,ou=people,dc=pcsol,dc=be
zimbraId: 96743ab5-9494-4877-bf69-56a83e268a1f
zimbraMailStatus: enabled
mail: i...@pcsol.be
zimbraMailAlias: i...@pcsol.be
uid: info
objectClass: zimbraDistributionList
objectClass: zimbraMailRecipient
zimbraMailForwardingAddress: celine.clai...@pcsol.be
zimbraMailForwardingAddress: didier.lecle...@pcsol.be
So I try typing :
postmap -q 'info' ldap:/etc/postfix/ldap-localusers.cf
But it gives me no outuput.

An idea??

Thx,
nm



Reply via email to