Re: [evolution-patches] Re-sent: Patch for 318227: Change LDAP search filter [mail/addressbook]



So is it ok to commit the updated patch?

Carsten Guenther wrote:
Sushma Rai wrote:
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.
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=*".
I am not sure what other clients does, but I guess default filter in thunderbird is "objectclass=*"
When typing in "eng" Thunderbird does "(|(cn=eng*)(mail=eng*)(sn=eng*))", there is no objectclass involved.
I think instead of mail=*, we can set the filter as (|(objectclass=person)(mail=*)).
That would be acceptable for us. Updated patch is attached although I still think that we should remove the "objectclass=person" part.

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:
Meaning that when sent the mail doesn't go to all the members of the
ldap mailing list.  Or does it?

On Mon, 2005-10-10 at 12:53 -0700, Carsten Guenther wrote:
What do you mean? Changing the search filter to "(mail=*)" allows me
to search and autocomplete mailing-lists. Autocompletion was the main
problem for us.

Chris Toshok wrote:
Not really..  what happens when you autocomplete against them?  The
point is just adding (mail=*) to the query doesn't fix the actual
problem, which is that evo doesn't deal with mailing lists on ldap
servers.

On Mon, 2005-10-10 at 12:40 -0700, Carsten Guenther wrote:
With my patch they would show up in addressbook searches. Only the lists email address will be displayed though, no membership information, but that is fine.

Chris Toshok wrote:
are mailing lists from ldap reflected as contact lists in the UI.  Seems
like you'd want that as well.

On Mon, 2005-10-10 at 12:12 -0700, Carsten Guenther wrote:
Can I commit this?

--
Attached patch fixes 318227. The LDAP search filter used was limited to
entries with objectclass "person" which prevented searching for
mailing-lists, a problem many people have. The patch changes the search
filter such that it looks for everything that has the attribute "mail"
set ("mail=*"). That's basically what Thunderbird and other clients do
as well.

I think bug 311884 still is valid but can be fixed t a later point.

Please review for commit to gnome-2-12 and head.

Thanks,
Carsten


_______________________________________________
Evolution-patches mailing list
Evolution-patches gnome org
http://mail.gnome.org/mailman/listinfo/evolution-patches
_______________________________________________
Evolution-patches mailing list
Evolution-patches gnome org
http://mail.gnome.org/mailman/listinfo/evolution-patches
_______________________________________________
Evolution-patches mailing list
Evolution-patches gnome org
http://mail.gnome.org/mailman/listinfo/evolution-patches
_______________________________________________
Evolution-patches mailing list
Evolution-patches gnome org
http://mail.gnome.org/mailman/listinfo/evolution-patches

------------------------------------------------------------------------

? 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);
------------------------------------------------------------------------

_______________________________________________
Evolution-patches mailing list
Evolution-patches gnome org
http://mail.gnome.org/mailman/listinfo/evolution-patches




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]