Index: src/camel/ChangeLog
===================================================================
--- src/camel/ChangeLog	(revision 194)
+++ src/camel/ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2009-04-22  Milan Crha  <mcrha@redhat.com>
+
+	** Part of fix for bug #563954
+
+	* camel-mapi-folder.c: (mapi_cmp_uids), (camel_mapi_folder_class_init):
+	Define its own compare function for UIDs.
+
 2009-03-19  Milan Crha  <mcrha@redhat.com>
 
 	** Fix for bug #574784
Index: src/camel/camel-mapi-folder.c
===================================================================
--- src/camel/camel-mapi-folder.c	(revision 194)
+++ src/camel/camel-mapi-folder.c	(working copy)
@@ -1511,6 +1511,15 @@ mapi_folder_rename (CamelFolder *folder,
 	((CamelFolderClass *)parent_class)->rename(folder, new);
 }
 
+static gint
+mapi_cmp_uids (CamelFolder *folder, const char *uid1, const char *uid2)
+{
+	g_return_val_if_fail (uid1 != NULL, 0);
+	g_return_val_if_fail (uid2 != NULL, 0);
+
+	return strcmp (uid1, uid2);
+}
+
 static void
 camel_mapi_folder_class_init (CamelMapiFolderClass *camel_mapi_folder_class)
 {
@@ -1523,6 +1532,7 @@ camel_mapi_folder_class_init (CamelMapiF
 	camel_folder_class->get_message = mapi_folder_get_message;
  	camel_folder_class->rename = mapi_folder_rename;
 	camel_folder_class->search_by_expression = mapi_folder_search_by_expression;
+	camel_folder_class->cmp_uids = mapi_cmp_uids;
 /* 	camel_folder_class->get_message_info = mapi_get_message_info; */
 /* 	camel_folder_class->search_by_uids = mapi_folder_search_by_uids;  */
 	camel_folder_class->search_free = mapi_folder_search_free;
