I've also modified zmtrainsa to train dspam. It grabs email in the same fashion as it does for SA training except it sends the messages to dspam for training. Add to /opt/zimbra/bin/zmtrainsa as follows:
Code:
if [ $MODE == "spam" ]; then
DMODE="spam"
elif [ $MODE == "ham" ]; then
DMODE="innocent"
fi Code:
echo "Training DSPAM"
/usr/bin/fetchmail -n -a -u $USER $FOLDER -m "/opt/dspam/bin/dspam --user zimbra --class=${DMODE} --source=corpus --mode=teft --feature=chained,noise --stdout" ${SERVER}
echo "You should run: dspam_clean -p0 zimbra to clean up useless dspam entries" Make sure this follows the added code
Code:
rm -f ${zimbra_home}/.fetchmailrc It should work, It'll train SA and DSPAM. Let me know if anyone has problems.
-Ben