+

Add search_spammer_in_mailq script

Benjamin Renard [2016-01-20 09:34:03]
Add search_spammer_in_mailq script
Filename
scripts/search_spammer_in_mailq
diff --git a/scripts/search_spammer_in_mailq b/scripts/search_spammer_in_mailq
new file mode 100755
index 0000000..f46703c
--- /dev/null
+++ b/scripts/search_spammer_in_mailq
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+IFS="
+"
+for line in $( top_sender )
+do
+	count=$( echo "$line"|awk '{print $1}' )
+	mail=$( echo "$line"|awk '{print $2}' )
+	while true
+	do
+		echo -n "-> $mail ($count mails) (i = inspect mail from / d = delete mail from / K = keap / q = quit ) ? "
+		read a
+		case $a in
+			i)
+				inspect_mail_from_sender "$mail"
+			;;
+			d)
+				drop_mail_from "$mail"
+				break
+			;;
+			k|"")
+				break
+			;;
+			q)
+				exit 0
+			;;
+			*)
+				echo "Bad choice !"
+		esac
+	done
+done
ViewGit