This is a simple script for VHCS (exim email servers) to teach spamassassin what is spam…
Put it into some place, make it executable, then add it to cron to be run once or twice a day (or every hour if you wish so)
— start of script–
#!/bin/bash
for SPAMFOLDERS in `find /var/mail/virtual/* -type d -wholename ‘*.Junk/cur’ -o -type d -wholename ‘*.Spam/cur’` ;do
echo “Learning as SPAM contents of:”$SPAMFOLDERS
sa-learn –spam –progress $SPAMFOLDERS
echo “Done with:”$SPAMFOLDERS
echo “———————–”
done
–end of script–
Z
