--- evolution-data-server-1.5.91/camel/providers/imap/camel-imap-provider.c~	2006-02-27 14:05:10.000000000 +0000
+++ evolution-data-server-1.5.91/camel/providers/imap/camel-imap-provider.c	2006-02-27 16:43:47.000000000 +0000
@@ -40,8 +40,11 @@ static gint imap_url_equal (gconstpointe
 CamelProviderConfEntry imap_conf_entries[] = {
 	{ CAMEL_PROVIDER_CONF_SECTION_START, "mailcheck", NULL,
 	  N_("Checking for New Mail") },
+	/* FIXME: Ideally we want a list here: Check for mail in: {No folders / INBOX only / subscribed / all} */
 	{ CAMEL_PROVIDER_CONF_CHECKBOX, "check_all", NULL,
 	  N_("C_heck for new messages in all folders"), "1" },
+	{ CAMEL_PROVIDER_CONF_CHECKBOX, "check_subscribed", NULL,
+	  N_("C_heck for new messages in all active folders"), "0" },
 	{ CAMEL_PROVIDER_CONF_SECTION_END },
 #ifndef G_OS_WIN32
 	{ CAMEL_PROVIDER_CONF_SECTION_START, "cmdsection", NULL,
--- evolution-data-server-1.5.91/camel/providers/imap/camel-imap-store.c~	2006-02-27 14:05:10.000000000 +0000
+++ evolution-data-server-1.5.91/camel/providers/imap/camel-imap-store.c	2006-02-27 16:44:51.000000000 +0000
@@ -287,6 +287,8 @@ construct (CamelService *service, CamelS
 	}
 	if (camel_url_get_param (url, "check_all"))
 		imap_store->parameters |= IMAP_PARAM_CHECK_ALL;
+	if (camel_url_get_param (url, "check_subscribed"))
+		imap_store->parameters |= IMAP_PARAM_CHECK_SUBSCRIBED;
 	if (camel_url_get_param (url, "filter")) {
 		imap_store->parameters |= IMAP_PARAM_FILTER_INBOX;
 		store->flags |= CAMEL_STORE_FILTER_INBOX;
@@ -372,6 +374,12 @@ imap_setv (CamelObject *object, CamelExc
 			store->parameters = flags;
 			/* no need to reconnect for this option to take effect... */
 			break;
+		case CAMEL_IMAP_STORE_CHECK_SUBSCRIBED:
+			flags = args->argv[i].ca_int ? IMAP_PARAM_CHECK_SUBSCRIBED : 0;
+			flags |= (store->parameters & ~IMAP_PARAM_CHECK_SUBSCRIBED);
+			store->parameters = flags;
+			/* no need to reconnect for this option to take effect... */
+			break;
 		case CAMEL_IMAP_STORE_FILTER_INBOX:
 			flags = args->argv[i].ca_int ? IMAP_PARAM_FILTER_INBOX : 0;
 			flags |= (store->parameters & ~IMAP_PARAM_FILTER_INBOX);
@@ -427,6 +435,9 @@ imap_getv (CamelObject *object, CamelExc
 		case CAMEL_IMAP_STORE_CHECK_ALL:
 			*args->argv[i].ca_int = store->parameters & IMAP_PARAM_CHECK_ALL ? TRUE : FALSE;
 			break;
+		case CAMEL_IMAP_STORE_CHECK_SUBSCRIBED:
+			*args->argv[i].ca_int = store->parameters & IMAP_PARAM_CHECK_SUBSCRIBED ? TRUE : FALSE;
+			break;
 		case CAMEL_IMAP_STORE_FILTER_INBOX:
 			*args->argv[i].ca_int = store->parameters & IMAP_PARAM_FILTER_INBOX ? TRUE : FALSE;
 			break;
--- evolution-data-server-1.5.91/camel/providers/imap/camel-imap-store.h~	2005-09-02 15:37:44.000000000 +0100
+++ evolution-data-server-1.5.91/camel/providers/imap/camel-imap-store.h	2006-02-27 16:45:26.000000000 +0000
@@ -64,6 +64,7 @@ enum {
 	CAMEL_IMAP_STORE_ARG_NAMESPACE,
 	CAMEL_IMAP_STORE_ARG_OVERRIDE_NAMESPACE,
 	CAMEL_IMAP_STORE_ARG_CHECK_ALL,
+	CAMEL_IMAP_STORE_ARG_CHECK_SUBSCRIBED,
 	CAMEL_IMAP_STORE_ARG_FILTER_INBOX,
 	CAMEL_IMAP_STORE_ARG_FILTER_JUNK,
 	CAMEL_IMAP_STORE_ARG_FILTER_JUNK_INBOX,
@@ -72,6 +73,7 @@ enum {
 #define CAMEL_IMAP_STORE_NAMESPACE           (CAMEL_IMAP_STORE_ARG_NAMESPACE | CAMEL_ARG_STR)
 #define CAMEL_IMAP_STORE_OVERRIDE_NAMESPACE  (CAMEL_IMAP_STORE_ARG_OVERRIDE_NAMESPACE | CAMEL_ARG_INT)
 #define CAMEL_IMAP_STORE_CHECK_ALL           (CAMEL_IMAP_STORE_ARG_CHECK_ALL | CAMEL_ARG_INT)
+#define CAMEL_IMAP_STORE_CHECK_SUBSCRIBED    (CAMEL_IMAP_STORE_ARG_CHECK_SUBSCRIBED | CAMEL_ARG_INT)
 #define CAMEL_IMAP_STORE_FILTER_INBOX        (CAMEL_IMAP_STORE_ARG_FILTER_INBOX | CAMEL_ARG_INT)
 #define CAMEL_IMAP_STORE_FILTER_JUNK         (CAMEL_IMAP_STORE_ARG_FILTER_JUNK | CAMEL_ARG_BOO)
 #define CAMEL_IMAP_STORE_FILTER_JUNK_INBOX   (CAMEL_IMAP_STORE_ARG_FILTER_JUNK_INBOX | CAMEL_ARG_BOO)
@@ -104,6 +106,7 @@ typedef enum {
 #define IMAP_PARAM_FILTER_JUNK			(1 << 3)
 #define IMAP_PARAM_FILTER_JUNK_INBOX		(1 << 4)
 #define IMAP_PARAM_SUBSCRIPTIONS		(1 << 5)
+#define IMAP_PARAM_CHECK_SUBSCRIBED		(1 << 6)
 
 struct _CamelImapStore {
 	CamelDiscoStore parent_object;	
