Index: evolution-data-server/servers/exchange/storage/exchange-account.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/exchange/storage/exchange-account.c,v
retrieving revision 1.32
diff -u -p -r1.32 exchange-account.c
--- evolution-data-server/servers/exchange/storage/exchange-account.c	10 May 2006 08:55:24 -0000	1.32
+++ evolution-data-server/servers/exchange/storage/exchange-account.c	22 Jul 2006 08:34:48 -0000
@@ -1861,6 +1861,22 @@ exchange_account_get_username (ExchangeA
 }
 
 /**
+  * exchange_account_get_email_id :
+  * @account : #ExchangeAccount
+  *
+  * Retunrs user's e-mail id. 
+  *
+  * Return value : e-mail id string.
+  **/
+char *
+exchange_account_get_email_id (ExchangeAccount *account)
+{
+	g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account), NULL);
+
+	return account->priv->identity_email;
+} 
+
+/**
   * exchange_account_folder_size_add :
   * @account : #ExchangeAccount
   * @folder_name : 
Index: evolution-data-server/servers/exchange/storage/exchange-account.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/exchange/storage/exchange-account.h,v
retrieving revision 1.8
diff -u -p -r1.8 exchange-account.h
--- evolution-data-server/servers/exchange/storage/exchange-account.h	21 Dec 2005 06:43:57 -0000	1.8
+++ evolution-data-server/servers/exchange/storage/exchange-account.h	22 Jul 2006 08:35:11 -0000
@@ -136,6 +136,8 @@ typedef enum {
 	EXCHANGE_ACCOUNT_FOLDER_PERMISSION_DENIED,
 	EXCHANGE_ACCOUNT_FOLDER_OFFLINE,
 	EXCHANGE_ACCOUNT_FOLDER_UNSUPPORTED_OPERATION,
+	EXCHANGE_ACCOUNT_FOLDER_GC_NOTREACHABLE,
+	EXCHANGE_ACCOUNT_FOLDER_NO_SUCH_USER,
 	EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR
 } ExchangeAccountFolderResult;
 
@@ -170,6 +172,8 @@ gboolean exchange_account_is_favorite_fo
 						           EFolder         *folder);
 
 char * exchange_account_get_username 			  (ExchangeAccount *account);
+
+char * exchange_account_get_email_id 			  (ExchangeAccount *account);
 
 int exchange_account_get_quota_limit			  (ExchangeAccount *account);
 
Index: evolution/plugins/exchange-operations/exchange-folder-subscription.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-folder-subscription.c,v
retrieving revision 1.9
diff -u -p -r1.9 exchange-folder-subscription.c
--- evolution/plugins/exchange-operations/exchange-folder-subscription.c	7 Jun 2006 07:04:44 -0000	1.9
+++ evolution/plugins/exchange-operations/exchange-folder-subscription.c	22 Jul 2006 08:50:29 -0000
@@ -189,6 +189,7 @@ subscribe_to_folder (GtkWidget *dialog, 
 {
 	SubscriptionInfo *subscription_info = data;
 	gchar *user_email_address = NULL, *folder_name = NULL, *path = NULL;
+	char *subscriber_email;
 	EFolder *folder = NULL;
 	EDestinationStore *destination_store;
 	GList *destinations;
@@ -212,6 +213,18 @@ subscribe_to_folder (GtkWidget *dialog, 
 
 			if (user_email_address != NULL && *user_email_address != '\0')
 				break;
+
+			/* check if user is trying to subscribe to his own folder */
+			subscriber_email = exchange_account_get_email_id (subscription_info->account);
+			if (subscriber_email != NULL && *subscriber_email != '\0') {
+				if (g_str_equal (subscriber_email, user_email_address)) {
+					e_error_run (NULL, ERROR_DOMAIN ":folder-exists-error", NULL);
+					g_free (user_email_address);
+					gtk_widget_destroy (dialog);
+					destroy_subscription_info (subscription_info);
+					return;
+				}
+			}
 
 			/* It would be nice to insensitivize the OK button appropriately 
 		   	instead of doing this, but unfortunately we can't do this for the
