diff -up evolution-data-server-3.8.5/camel/camel-imapx-store.c.eds evolution-data-server-3.8.5/camel/camel-imapx-store.c
--- evolution-data-server-3.8.5/camel/camel-imapx-store.c.eds	2014-02-21 11:16:31.017556946 +0100
+++ evolution-data-server-3.8.5/camel/camel-imapx-store.c	2014-02-21 11:17:50.106553486 +0100
@@ -92,6 +92,13 @@ G_DEFINE_TYPE_WITH_CODE (
 		CAMEL_TYPE_SUBSCRIBABLE,
 		camel_subscribable_init))
 
+static CamelFolderInfo *
+imapx_store_create_folder_sync (CamelStore *store,
+                                const gchar *parent_name,
+                                const gchar *folder_name,
+                                GCancellable *cancellable,
+                                GError **error);
+
 static guint
 imapx_name_hash (gconstpointer key)
 {
@@ -1334,8 +1341,37 @@ imapx_store_get_folder_sync (CamelStore
 	CamelSettings *settings;
 	gboolean use_real_junk_path = FALSE;
 	gboolean use_real_trash_path = FALSE;
+	GError *local_error = NULL;
+
+	folder = get_folder_offline (store, folder_name, flags, &local_error);
+
+	if (!folder && (flags & CAMEL_STORE_FOLDER_CREATE) != 0 &&
+	    g_error_matches (local_error, CAMEL_STORE_ERROR, CAMEL_STORE_ERROR_NO_FOLDER)) {
+		CamelFolderInfo *fi;
+		gchar *parent_folder = g_strdup (folder_name), *slash;
+		const gchar *use_folder_name = folder_name;
 
-	folder = get_folder_offline (store, folder_name, flags, error);
+		g_clear_error (&local_error);
+
+		slash = strrchr (parent_folder, '/');
+		if (slash) {
+			*slash = '\0';
+			use_folder_name = slash + 1;
+		} else {
+			*parent_folder = '\0';
+		}
+
+		fi = imapx_store_create_folder_sync (store, parent_folder, use_folder_name, cancellable, error);
+		if (fi) {
+			camel_folder_info_free (fi);
+			folder = get_folder_offline (store, folder_name, flags, error);
+		}
+
+		g_free (parent_folder);
+	} else if (!folder) {
+		g_propagate_error (error, local_error);
+		local_error = NULL;
+	}
 
 	/* Configure the folder flags according to IMAPX settings.
 	 *
