X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/5af333ca3b83425e5cb3aa704b37654d576856c1..15c8a9a5d97f1d2ac843765a35a02690c8a73148:/bin/retrain diff --git a/bin/retrain b/bin/retrain index a95fbc9..fa7a244 100755 --- a/bin/retrain +++ b/bin/retrain @@ -1,8 +1,10 @@ #!/bin/sh set -eu -NICE='nice -20' -PROCMAIL="$HOME/.etc/mailfilter/procmail/procmailrc" +NICE='/usr/bin/nice -20' +NICE='' + +RESUBMIT="$NICE $HOME/.etc/mailfilter/bin/resubmit" PAUSETIME=10 @@ -50,7 +52,7 @@ if ! lockfile -0 -r0 -l 3600 "$LOCKFILE" 2>/dev/null; then fi find $MAILDIR/cur $MAILDIR/new -type f | while read msg; do - $NICE ${0%/*}/train $ARG "$msg" | $PROCMAIL || ret=$? + $NICE ${0%/*}/train $ARG "$msg" | $RESUBMIT || ret=$? case "${ret:-0}" in 0|75) :;; esac