OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: LDAP Postmap Query

From: Andrew Ho (andrewhoanimezone.org)
Date: Mon Sep 10 2007 - 16:07:40 CDT


James wrote:
> Hey guys i'm having some problems doing some queries with postmap
>
> Here's the results of my command
> postmap -v -q "jamesjwindow.com" /etc/postfix/ldap-users.cf
>
try this :

postmap -v -q "jamesjwindow.com" ldap:/etc/postfix/ldap-users.cf

    Andrew

> postmap: dict_ldap_lookup: /etc/postfix/ldap-users.cf: Searching with
> filter mail=jamesjwindow.com
> 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-users.cf
>
> Here's my ldap-users.cf:
>
> bind = no
> version = 3
> server_host = ldap://ldap.example.com:389
> scope = sub
> search_base = dc=example,dc=com
> query_filter = mail=%s
> result_attribute = memberaddr
>
>
> The entry has several mail attributes
> one is jamesjwindow.com
>
>
> Any help is appreciated TIA.
>
>