Index: camel/camel-folder.c
===================================================================
--- camel/camel-folder.c.orig
+++ camel/camel-folder.c
@@ -75,7 +75,9 @@ static void set_message_user_tag(CamelFo
 
 static gint get_message_count(CamelFolder *folder);
 
-static void expunge             (CamelFolder *folder,
+static void expunge            (CamelFolder *folder,
+				 CamelException *ex);
+static void expunge_uids       (CamelFolder *source, GPtrArray *uids,
 				 CamelException *ex);
 static gint folder_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args);
 static void folder_free(CamelObject *o, guint32 tag, gpointer val);
@@ -140,6 +142,7 @@ camel_folder_class_init (CamelFolderClas
 	camel_folder_class->get_full_name = get_full_name;
 	camel_folder_class->get_parent_store = get_parent_store;
 	camel_folder_class->expunge = expunge;
+	camel_folder_class->expunge_uids = expunge_uids;
 	camel_folder_class->get_message_count = get_message_count;
 	camel_folder_class->append_message = append_message;
 	camel_folder_class->get_permanent_flags = get_permanent_flags;
@@ -1637,10 +1640,46 @@ camel_folder_transfer_messages_to (Camel
 			CF_CLASS (dest)->transfer_messages_to (source, uids, dest, transferred_uids, delete_originals, ex);
 		else
 			CF_CLASS (source)->transfer_messages_to (source, uids, dest, transferred_uids, delete_originals, ex);
+	} else if ((source->folder_flags & CAMEL_FOLDER_FILTER_EXPUNGE) && delete_originals) {
+		delete_originals = FALSE;
+		transfer_messages_to (source, uids, dest, transferred_uids, delete_originals, ex);
+		camel_folder_expunge_uids (source, uids, ex);
 	} else
 		transfer_messages_to (source, uids, dest, transferred_uids, delete_originals, ex);
 }
 
+
+static void
+expunge_uids (CamelFolder *source, GPtrArray *uids,
+				   CamelException *ex)
+{
+	w(g_warning ("CamelFolder::filter expunge not implemented for '%s'",
+		     camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
+}
+
+/**
+ * camel_folder_expunge_uids:
+ * @source: the source #CamelFolder object
+ * @uids: message UIDs in @source
+ * @ex: a #CamelException
+ *
+ * This expunges @uids from @source folders
+ **/
+void
+camel_folder_expunge_uids (CamelFolder *source, GPtrArray *uids,
+				   CamelException *ex)
+{
+	g_return_if_fail (CAMEL_IS_FOLDER (source));
+	g_return_if_fail (uids != NULL);
+
+	CAMEL_FOLDER_REC_LOCK(source, lock);
+	
+	CF_CLASS (source)->expunge_uids (source, uids, ex);
+
+	CAMEL_FOLDER_REC_UNLOCK(source, lock);
+}
+
+
 static void
 delete (CamelFolder *folder)
 {
Index: camel/camel-folder.h
===================================================================
--- camel/camel-folder.h.orig
+++ camel/camel-folder.h
@@ -117,10 +117,11 @@ struct _CamelFolder {
 #define CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY (1<<0)
 #define CAMEL_FOLDER_HAS_SEARCH_CAPABILITY  (1<<1)
 #define CAMEL_FOLDER_FILTER_RECENT          (1<<2)
-#define CAMEL_FOLDER_HAS_BEEN_DELETED       (1<<3)
-#define CAMEL_FOLDER_IS_TRASH               (1<<4)
-#define CAMEL_FOLDER_IS_JUNK                (1<<5)
-#define CAMEL_FOLDER_FILTER_JUNK	    (1<<6)
+#define CAMEL_FOLDER_FILTER_EXPUNGE         (1<<3)
+#define CAMEL_FOLDER_HAS_BEEN_DELETED       (1<<4)
+#define CAMEL_FOLDER_IS_TRASH               (1<<5)
+#define CAMEL_FOLDER_IS_JUNK                (1<<6)
+#define CAMEL_FOLDER_FILTER_JUNK	    (1<<7)
 
 typedef struct {
 	CamelObjectClass parent_class;
@@ -138,6 +139,9 @@ typedef struct {
 
 	void (*expunge)  (CamelFolder *folder,
 			  CamelException *ex);
+	void (*expunge_uids)  (CamelFolder *folder,
+			       GPtrArray *uids,
+			       CamelException *ex);
 
 	gint   (*get_message_count)   (CamelFolder *folder);
 
@@ -337,6 +341,9 @@ void               camel_folder_transfer
 							GPtrArray **transferred_uids,
 							gboolean delete_originals,
 							CamelException *ex);
+void               camel_folder_expunge_uids           (CamelFolder *source,
+							GPtrArray *uids,
+							CamelException *ex);
 
 void               camel_folder_delete                 (CamelFolder *folder);
 void               camel_folder_rename                 (CamelFolder *folder, const gchar *new);
Index: servers/exchange/storage/exchange-account.c
===================================================================
--- servers/exchange/storage/exchange-account.c.orig
+++ servers/exchange/storage/exchange-account.c
@@ -2360,6 +2360,9 @@ exchange_account_new (EAccountList *acco
 	param = e2k_uri_get_param (uri, "filter");
 	if (param)
 		account->filter_inbox = TRUE;
+	param = e2k_uri_get_param (uri, "filter_expunge");
+	if (param)
+		account->filter_inbox_expunge = TRUE;
 	param = e2k_uri_get_param (uri, "filter_junk");
 	if (param)
 		account->filter_junk = TRUE;
Index: servers/exchange/storage/exchange-account.h
===================================================================
--- servers/exchange/storage/exchange-account.h.orig
+++ servers/exchange/storage/exchange-account.h
@@ -35,7 +35,7 @@ struct _ExchangeAccount {
 	gchar *exchange_server, *home_uri, *public_uri;
 	gchar *legacy_exchange_dn, *default_timezone;
 
-	gboolean filter_inbox, filter_junk, filter_junk_inbox_only;
+	gboolean filter_inbox, filter_inbox_expunge, filter_junk, filter_junk_inbox_only;
 	gdouble mbox_size;
 };
 
