Spamassassin command to tag mail & move mail with a spam score of over 10 to a new folder?
- by ane
Have a maildir with tens of thousands of messages in it, about 70% of which are spam.
Would like to:
Run /usr/local/bin/spamassassin against it, tagging each message if the score is 10 or greater
Have a tcsh shell or perl one-liner grep all mails with a spam score of over 10 and move those mails to /tmp/spam
What commands can I run to accomplish this? Pseudocode:
/usr/local/bin/spamassassin ./Maildir/cur/* -tagscore10
grep "X-Spam-Score: [10-100]" ./Maildir/cur/* | mv %1 /tmp/spam