Sushma Rai wrote:
Wouldn't it be a mistake to have those returned? What would I do with those? I think that's another reason of dumping "objectclass=person" in favour of "mail=*".Hi, As I commented on the bug, this is not the solution for the bug. With (mail=*), Evolution will fail to retrieve the objects which doesn't have e-mail ids. When typing in "eng" Thunderbird does "(|(cn=eng*)(mail=eng*)(sn=eng*))", there is no objectclass involved.I am not sure what other clients does, but I guess default filter in thunderbird is "objectclass=*" That would be acceptable for us. Updated patch is attached although I still think that we should remove the "objectclass=person" part.I think instead of mail=*, we can set the filter as (|(objectclass=person)(mail=*)). Please review and I will commit. Thanks, Carsten Thanks, Sushma. On Mon, 2005-10-10 at 14:12 -0700, Carsten Guenther wrote:Sure it does, that's the whole point :-) Maybe we are talking about two different things here. I am talking about mailing-lists that are resolved on the server (and that are maintained by the server administrator) and where the list itself has an email address. For example at Scalix we have eng scalix com with alle the engineers being members, but the email address eng scalix com is all you need to write to all the members. So, obviously the query "objectclass=person" does not cut it because mailing-lists have objectclass "distributionList" or something different, depending of the product. But by using "mail=*" you get every entry that is adressable, mailing-lists included. BTW, that's how most other clients (Thunderbird for exmaple) do it as well. I am aware that this does not entirely fix the issue "Evolution does not deal with LDAP groups", but it is a one-line fix that fixes some of the issues and one that can be applied to 2.4 as well (that's what we actually need). Carsten Chris Toshok wrote: |
? 318227.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.310.2.1
diff -u -p -r1.310.2.1 ChangeLog
--- ChangeLog 4 Oct 2005 06:43:10 -0000 1.310.2.1
+++ ChangeLog 7 Oct 2005 17:57:53 -0000
@@ -1,3 +1,11 @@
+2005-10-07 Carsten Guenther <carsten guenther scalix com>
+
+ Fixes #318227
+
+ * backends/ldap/e-book-backend-ldap.c: Change ldap search filter
+ to include everything that has an email address. This will ensure
+ mailing-lists will be found as well.
+
2005-10-04 Sushma Rai <rsushma novell com>
* backends/ldap/e-book-backend-ldap.c: Added a mutext for ldap
Index: backends/ldap/e-book-backend-ldap.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/ldap/e-book-backend-ldap.c,v
retrieving revision 1.49.2.1
diff -u -p -r1.49.2.1 e-book-backend-ldap.c
--- backends/ldap/e-book-backend-ldap.c 4 Oct 2005 06:43:11 -0000 1.49.2.1
+++ backends/ldap/e-book-backend-ldap.c 7 Oct 2005 17:57:53 -0000
@@ -3250,7 +3250,7 @@ e_book_backend_ldap_build_query (EBookBa
else {
strings = g_new0(char*, 5);
strings[0] = g_strdup ("(&");
- strings[1] = g_strdup ("(objectclass=person)");
+ strings[1] = g_strdup ("(|(objectclass=person)(mail=*))");
strings[2] = data.list->data;
strings[3] = g_strdup (")");
retval = g_strjoinv (" ", strings);