Hi,
Here is a real easy to script to use to scan ALL domains/users for a .Spam folder and this will scan the new and cur directories within it and then deleted them if you want to.
#!/usr/local/bin/bash
spamlearn=/usr/local/bin/sa-learn
LearnDirs=`find /home/vpopmail/domains/ -name .Spam -type d`
for dir in $LearnDirs; do
$spamlearn --spam $dir/cur > /dev/null
$spamlearn --spam $dir/new > /dev/null
# the rm lines are optional
rm -f $dir/cur/*
rm -f $dir/new/*
$spamlearn --sync
done
I have something else I need to post but I can't seem to find it yet.
阅读(2053) | 评论(0) | 转发(0) |