summaryrefslogtreecommitdiff
path: root/postfix/purge-spam-from-queue.sh
diff options
context:
space:
mode:
Diffstat (limited to 'postfix/purge-spam-from-queue.sh')
-rwxr-xr-xpostfix/purge-spam-from-queue.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/postfix/purge-spam-from-queue.sh b/postfix/purge-spam-from-queue.sh
new file mode 100755
index 0000000..b03eac3
--- /dev/null
+++ b/postfix/purge-spam-from-queue.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+badmails=`mailq | egrep -v '^( |$)' | egrep '@(earthlink\.net|yahoo\.com|excite\.com|hotmail\.com)' | sed 's/[^[:alnum:]].*//'`
+
+for x in $badmails; do
+ postsuper -d $x
+done