From 60a1266c0c7c4465aef3d1d3a44c9d0ec9b09bf4 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 3 Oct 2006 20:09:02 +0000 Subject: Add learn- scripts git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@185 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- learn-ham | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 learn-ham (limited to 'learn-ham') diff --git a/learn-ham b/learn-ham new file mode 100755 index 0000000..3c2290f --- /dev/null +++ b/learn-ham @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +MAILDIR=/srv/mail/$LOGNAME-d/ + +if [ -d "$MAILDIR/.xham.learn" ] ; then + cd "$MAILDIR/.xham.learn" + files=$(find -type f) + if [ -n "$files" ] ; then + #sa-learn --ham $files > /dev/null 2>&1 + if [ -d "$HOME/.bogofilter" ]; then + bogofilter --register-ham -B $files + fi + for file in $files ;do + mv $file $MAILDIR/.xham.learned/$file + done + fi +fi -- cgit v1.2.3