Bisher habe ich
Code: Alles auswählen
#!/bin/bash
if [ -z "`ls /var/vmail/public/.Spamlern/cur/`" ] ; then
exit
fi
sa-learn --dbpath=/var/lib/spamassassin/.spamassassin/bayes --spam /var/vmail/public/.Spamlern/cur/
mv /var/vmail/public/.Spamlern/cur/* /var/vmail/public/learned/
Da Thunderbird manchmal aus unerklärlichen Gründen nochmal einen Unterordner benötigt, braucht das Script nun noch sowas:
Code: Alles auswählen
if [ -z "`ls /var/vmail/public/.Spamlern/.Spamlern/cur/`" ] ; then
exit
fi
sa-learn --dbpath=/var/lib/spamassassin/.spamassassin/bayes --spam /var/vmail/public/.Spamlern/.Spamlern/cur/
mv /var/vmail/public/.Spamlern/.Spamlern/cur/* /var/vmail/public/learned/