Blame SOURCES/evolution-data-server-3.28.5-imapx-icloud-mail.patch

a953d4
diff -up evolution-data-server-3.28.5/src/camel/providers/imapx/camel-imapx-server.c.imapx-icloud-mail evolution-data-server-3.28.5/src/camel/providers/imapx/camel-imapx-server.c
a953d4
--- evolution-data-server-3.28.5/src/camel/providers/imapx/camel-imapx-server.c.imapx-icloud-mail	2021-04-23 09:30:07.734875376 +0200
a953d4
+++ evolution-data-server-3.28.5/src/camel/providers/imapx/camel-imapx-server.c	2021-04-23 09:31:45.321718451 +0200
a953d4
@@ -629,6 +629,12 @@ imapx_server_stash_command_arguments (Ca
a953d4
 		if (CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, SPECIAL_USE) || CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, X_GM_EXT_1))
a953d4
 			g_string_append_printf (buffer, " SPECIAL-USE");
a953d4
 		is->priv->list_return_opts = g_string_free (buffer, FALSE);
a953d4
+	} else if (!is->priv->is_broken_cyrus && CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, LIST_STATUS)) {
a953d4
+		buffer = g_string_new ("");
a953d4
+		g_string_append_printf (
a953d4
+			buffer, "STATUS (%s)",
a953d4
+			is->priv->status_data_items);
a953d4
+		is->priv->list_return_opts = g_string_free (buffer, FALSE);
a953d4
 	} else {
a953d4
 		is->priv->list_return_opts = NULL;
a953d4
 	}
a953d4
@@ -6208,7 +6214,7 @@ camel_imapx_server_list_sync (CamelIMAPX
a953d4
 
a953d4
 	camel_imapx_command_unref (ic);
a953d4
 
a953d4
-	if (success && !is->priv->list_return_opts) {
a953d4
+	if (success && (!is->priv->list_return_opts || CAMEL_IMAPX_LACK_CAPABILITY (is->priv->cinfo, LIST_EXTENDED))) {
a953d4
 		ic = camel_imapx_command_new (is, CAMEL_IMAPX_JOB_LSUB, "LSUB \"\" %s",
a953d4
 			pattern);
a953d4
 
a953d4
diff -up evolution-data-server-3.28.5/src/camel/providers/imapx/camel-imapx-utils.c.imapx-icloud-mail evolution-data-server-3.28.5/src/camel/providers/imapx/camel-imapx-utils.c
a953d4
--- evolution-data-server-3.28.5/src/camel/providers/imapx/camel-imapx-utils.c.imapx-icloud-mail	2018-07-30 15:17:06.000000000 +0200
a953d4
+++ evolution-data-server-3.28.5/src/camel/providers/imapx/camel-imapx-utils.c	2021-04-23 09:30:07.736875373 +0200
a953d4
@@ -580,13 +580,6 @@ imapx_parse_capability (CamelIMAPXInputS
a953d4
 			stream, &token, &len, cancellable, &local_error);
a953d4
 	}
a953d4
 
a953d4
-	/* Some capabilities are extensions of other capabilities.
a953d4
-	 * Make sure all prerequisite capability flags are present. */
a953d4
-
a953d4
-	/* LIST-STATUS is an extension of LIST-EXTENDED. */
a953d4
-	if (CAMEL_IMAPX_HAVE_CAPABILITY (cinfo, LIST_STATUS))
a953d4
-		cinfo->capa |= imapx_lookup_capability ("LIST-EXTENDED");
a953d4
-
a953d4
 	if (local_error != NULL) {
a953d4
 		g_propagate_error (error, local_error);
a953d4
 		imapx_free_capability (cinfo);