Exim – Spool destroyer

In case of massive spam attack.

#!/bin/bash
ls /var/spool/exim/input/ > /tmp/delspoorexim
declare -a ARRAY
exec 10< /tmp/delspoorexim
let count=0
while read dels <&10; do
rm -fr /var/spool/exim/input/$dels
echo $dels
ARRAY[$count]=$dels
((count++))
done
echo Number operation done: ${#ARRAY[@]}
#echo ${ARRAY[@]}
exec 10>&-
rm /tmp/delspoorexim

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.