pombreda / google-calendar-connectors

Automatically exported from code.google.com/p/google-calendar-connectors
0 stars 0 forks source link

LDAP search filter issue (change mail attribute to proxyAddresses attribute) #53

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

In our enterprise many users have mail aliases:
alexey.landgraf@test.com (primary email address)
alexei.landgraf@test.com (alias)

What is the expected output? What do you see instead?

If I try to see user's free-busy information using his alexei.landgraf@test.com 
address in logs I see:

2011-05-27 17:30:53,052 [3320] INFO  
Google.GCalExchangeSync.Library.ActiveDirectoryService - Issuing LDAP query 
'(&(mail=alexei.landgraf@test.com)(|(objectcategory=user)(objectcategory=contact
)))'
2011-05-27 17:30:53,067 [3320] INFO  
Google.GCalExchangeSync.Library.ActiveDirectoryService - Found 0 users in 
Active Directory.
As result no free-busy info is shown.

If I use alexey.landgraf@test.com all goes OK.

Is it possible to modify a search filter to 
(&(proxyAddresses=SMTP:alexei.landgraf@test.com)(|(objectcategory=user)(objectca
tegory=contact))) ? I mean to use proxyAddress attribute instead of "mail" 
attribute? 

It will just cover not only primary email address, but aliases also.

Original issue reported on code.google.com by webmas...@antair.org.ua on 27 May 2011 at 2:05

GoogleCodeExporter commented 9 years ago
You can use any valid ldap filter. 
"(|(objectcategory=user)(objectcategory=contact))" would be atuomatically 
appended to the filter that you have specified.

Original comment by jaideepg...@google.com on 30 May 2011 at 12:57

GoogleCodeExporter commented 9 years ago
So in my case I just have to add:
<!-- Custom LDAP query for Active Directory lookup -->
<add key="Exchange.LDAPQuery" value="(proxyAddresses=SMTP:{0})"/>

[0] will be substituted by searched email address? Is it correct?

Original comment by webmas...@antair.org.ua on 30 May 2011 at 2:57

GoogleCodeExporter commented 9 years ago
No, {0} will not be replaced by email address. You can you some regular 
expression which matches all the users. ex. mail=*@test.com

Original comment by jaideepg...@google.com on 1 Jun 2011 at 12:30