I have a Maildir with about 50k emails, about 42k of which are spam (the result of leaving my domain and email up and not using it for 2 years).
I have the following script to try and filter out spam:
#!/bin/sh
for email in "$@"; do
if ! spamassassin -e < "$email" > /dev/null 2>&1; then
mv "$email" /tmp/spam
fi
done
But this is taking forever!
The device I am only able to do this on is limited, it's a NAS with an arm processor...but still!
Is there possibly any faster way to do this? At the moment, workingon a subdir with 1000 files, it's been going for almost 12 hours and found 36 spam messages...