Tahnk Steve this is a single user ldif , dc=Avalon and dc=avalon works two I tried change it to probe only.
dn: CN=sogo,CN=Users,DC=avalon,DC=com,DC=es changetype: add objectClass: top objectClass: person objectClass: organizationalPerson objectClass: user cn: sogo givenName: sogo distinguishedName: CN=sogo,CN=Users,DC=avalon,DC=com,DC=es instanceType: 4 whenCreated: 20120306123804.0Z whenChanged: 20120309005323.0Z displayName: sogo uSNCreated: 461468 uSNChanged: 491459 name: sogo objectGUID:: iZBt9gPCnkycvvgHK0/xyA== userAccountControl: 66048 codePage: 0 countryCode: 0 pwdLastSet: 129756792826281720 primaryGroupID: 513 objectSid:: AQUAAAAAAAUVAAAAlDfe6z2UYrezklsJdycAAA== accountExpires: 9223372036854775807 sAMAccountName: sogo sAMAccountType: 805306368 userPrincipalName: s...@avalon.com.es objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=avalon,DC=com,DC=es dSCorePropagationData: 20120308125326.0Z dSCorePropagationData: 20120308125326.0Z dSCorePropagationData: 20120308125326.0Z dSCorePropagationData: 16010108151056.0Z lastLogonTimestamp: 129757002741425590 Mikel Gilsanz Prieto Responsable Dpto. Sistemas / IT Manager mgils...@grupoavalon.es www.grupoavalon.es El mié, 28-03-2012 a las 19:26 +0200, Stephen Ingram escribió: > On Wed, Mar 28, 2012 at 9:40 AM, Mikel <mgils...@grupoavalon.es> > wrote: > > Thank you Steve > > The matter is that, I have configurated ldap-aliases.cf > > > server_host = 10.48.1.198 > bind = yes > version = 3 > bind_dn= cn=sogoprueba,cn=Users,dc=avalon,dc=com,dc=es > > > bind_pw= password > search_base = dc=Avalon,dc=com,dc=es > ldap_filter = * > result_attribute = mail > #special_result_filter = %u@%d > > But if I run: > > postmap -q mgils...@grupoavalon.es > ldap:/etc/postfix/ldap-aliases.cf > > or > > > > postmap -q mgilsanz ldap:/etc/postfix/ldap-aliases.cf > > > > > I don't get nothing....and I think that the problem about > postfix is not able to find users. > > If I query to ldap with ldapsearch: > > ldapsearch -P3 -a never -x -H ldap://10.48.1.198 -D 'cn= > sogoprueba,cn=Users,dc=avalon,dc=com,dc=es' -w password -b > 'dc=Avalon,dc=com,dc=es' '(cn=*)' mail | grep mgilsanz the > result is: > > mail: mgils...@grupoavalon.es > > I answer about the filter on ldap-aliases.cf of postfix > > how about result_attribute = mail in ldap-aliases.cf because > if I am be able to do ldapsearch > and find user mgilsanz How can I do the same query in > ldap-aliases.cf to find users in my domain? > > Any idea, I think that the problem is Ldap query but I don't > know what is wron... > > > > First, why the difference dc=Avalon,dc=com,dc=es and > dc=avalon,dc=com,dc=es? > > > Also, ldap_filter should be query_filter and should have an expression > with attributes in it. Your ldapsearch command is more complex than > your postfix ldap-aliases.cf. Can you please show the ldif of a single > user? > > > Steve