summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'z-distfiles/scripts-gw/spam-report')
-rwxr-xr-xz-distfiles/scripts-gw/spam-report19
1 files changed, 19 insertions, 0 deletions
diff --git a/z-distfiles/scripts-gw/spam-report b/z-distfiles/scripts-gw/spam-report
new file mode 100755
index 0000000..68a3f0e
--- /dev/null
+++ b/z-distfiles/scripts-gw/spam-report
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+if [ -d "${1}" ]; then
+ MAILS="`ls ${1}`"
+ if [ ! -z "${MAILS}" ]; then
+ for MAIL in ${MAILS}
+ do
+ echo "Report ${1}/${MAIL}"
+ spamassassin -r < "${1}/${MAIL}"
+ echo "Delete ${1}/${MAIL}"
+ rm "${1}/${MAIL}"
+ done
+ fi
+ if [ -z "${MAILS}" ]; then
+ echo "Nothing in ${1} to report!"
+ fi
+fi
+
+