diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 22aa88e..4b9c987 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -18,6 +18,7 @@
  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
  *
  */
+#include <camel/camel-stream-mem.h>
 
 #include "e-mail-shell-view-private.h"
 
@@ -396,6 +397,119 @@ action_mail_folder_select_all_cb (GtkAction *action,
 		action_mail_folder_select_all_timeout_cb (message_list);
 }
 
+
+/* Helper for action_mail_folder_select_all_cb() */
+static const GChecksumType duplicate_csum = G_CHECKSUM_SHA256;
+
+static gchar*
+get_message_checksum (CamelFolder *folder,
+                 const gchar *uid)
+{
+	CamelMimeMessage *msg;
+	CamelException    ex;
+	CamelDataWrapper *content;
+	CamelStream      *mem;
+	gchar           *digest = NULL;
+
+	camel_exception_init (&ex);
+	msg = camel_folder_get_message (folder, uid, &ex);
+
+	if (camel_exception_is_set (&ex)) {
+		camel_exception_clear (&ex);
+		return NULL;
+	}
+
+	/* get message contents */
+	content = camel_medium_get_content_object ((CamelMedium *) msg);
+	if (!content)
+		return NULL;
+
+	/* calculate checksum */
+	mem = camel_stream_mem_new ();
+	camel_data_wrapper_decode_to_stream (content, mem);
+
+	digest = g_compute_checksum_for_data (duplicate_csum, 
+		((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
+
+	camel_object_unref (mem);
+	camel_object_unref (msg);
+
+	return digest;
+}
+
+static gboolean
+message_is_duplicated (GHashTable *messages, guint64 id, gchar *digest)
+{
+	gchar *hash_digest = g_hash_table_lookup (messages, &id);
+
+	if (!hash_digest)
+		return FALSE;
+
+	return g_str_equal(digest, hash_digest); 
+}
+
+static void
+action_mail_folder_select_duplicate (GtkAction *action,
+                                  EMailShellView *mail_shell_view)
+{
+	EShellView *shell_view;
+        EShellContent *shell_content;
+        EMailReader *reader;
+        MessageList *message_list;
+	CamelFolder *folder;
+	GHashTable *messages;
+
+        GPtrArray *uids, *dups;
+	gint i;
+
+        shell_view = E_SHELL_VIEW (mail_shell_view);
+        shell_content = e_shell_view_get_shell_content (shell_view);
+        reader = (EMailReader *) (shell_content);
+        message_list = e_mail_reader_get_message_list (reader);
+        uids = message_list_get_uids(message_list);
+	folder = message_list->folder;
+
+	messages = g_hash_table_new_full (g_int_hash, g_int_equal, g_free, g_free);
+
+	/* Running this would select duplicate messages along
+	 * with previously selected messages, 
+	 * which according to me is no-no
+	 *
+	 * I have not found a method to clear selection
+	 * hence the crud below
+	 */
+	message_list_select_all (message_list);
+	message_list_invert_selection (message_list);
+
+	dups = g_ptr_array_new();
+
+	for (i = 0; i < uids->len; i++) {
+	        CamelMessageInfo *msg_info = camel_folder_get_message_info (folder, uids->pdata[i]);
+	        const CamelSummaryMessageID *mid = camel_message_info_message_id (msg_info);
+	        gchar *digest = get_message_checksum (folder, uids->pdata[i]);
+	        guint32 flags = camel_message_info_flags (msg_info);
+
+		if (!(flags & CAMEL_MESSAGE_DELETED)) {
+			if (message_is_duplicated (messages, mid->id.id, digest)) {
+				g_ptr_array_add (dups, uids->pdata[i]);
+			} else {
+				guint64 *id;
+				id = g_new0 (guint64, 1);
+				*id = mid->id.id;
+				g_hash_table_insert (messages, id, digest);
+			}
+		}
+		camel_message_info_free (msg_info);
+	}
+
+	message_list_set_selected(message_list, dups);
+
+	g_hash_table_destroy (messages);
+	message_list_free_uids (message_list, uids);
+
+	g_ptr_array_free (dups, TRUE);
+}
+
 static void
 action_mail_folder_select_thread_cb (GtkAction *action,
                                      EMailShellView *mail_shell_view)
@@ -1139,6 +1253,13 @@ static GtkActionEntry mail_entries[] = {
 	  N_("Select all visible messages"),
 	  G_CALLBACK (action_mail_folder_select_all_cb) },
 
+        { "mail-folder-select-duplicate",
+          NULL,
+          N_("Select all Duplicate messages"),
+          "",
+          N_("Select all duplicate messages"),
+          G_CALLBACK (action_mail_folder_select_duplicate) },
+
 	{ "mail-folder-select-thread",
 	  NULL,
 	  N_("Select Message _Thread"),
diff --git a/modules/mail/e-mail-shell-view-actions.h b/modules/mail/e-mail-shell-view-actions.h
index 99819f0..c5c9eb8 100644
--- a/modules/mail/e-mail-shell-view-actions.h
+++ b/modules/mail/e-mail-shell-view-actions.h
@@ -85,6 +85,8 @@
 	E_SHELL_WINDOW_ACTION ((window), "mail-folder-rename")
 #define E_SHELL_WINDOW_ACTION_MAIL_FOLDER_SELECT_ALL(window) \
 	E_SHELL_WINDOW_ACTION ((window), "mail-folder-select-all")
+#define E_SHELL_WINDOW_ACTION_MAIL_FOLDER_SELECT_DUPLICATE(window) \
+        E_SHELL_WINDOW_ACTION ((window), "mail-folder-select-duplicate")
 #define E_SHELL_WINDOW_ACTION_MAIL_FOLDER_SELECT_THREAD(window) \
 	E_SHELL_WINDOW_ACTION ((window), "mail-folder-select-thread")
 #define E_SHELL_WINDOW_ACTION_MAIL_FOLDER_SELECT_SUBTHREAD(window) \
diff --git a/ui/evolution-mail.ui b/ui/evolution-mail.ui
index c35ddbc..6eaca9b 100644
--- a/ui/evolution-mail.ui
+++ b/ui/evolution-mail.ui
@@ -43,6 +43,7 @@
         <menuitem action='mail-folder-move'/>
         <separator/>
         <menuitem action='mail-folder-select-all'/>
+        <menuitem action='mail-folder-select-duplicate'/>
         <menuitem action='mail-folder-select-thread'/>
         <menuitem action='mail-folder-select-subthread'/>
         <menuitem action='mail-folder-mark-all-as-read'/>
