w0ls0n
public text v1 · immutable#!/usr/local/bin/bash
spamlearn=/usr/local/bin/sa-learn
LearnDirs=`find /home/vpopmail/domains/ -name .IsSpam -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