summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-10-03 20:40:02 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2006-10-03 20:40:02 +0000
commitafbb53a9f72db72ed65352d75b2fb44eeae39b93 (patch)
treebf5e426caa5315a75e80ebe4fa379c348f9f31be
parent60a1266c0c7c4465aef3d1d3a44c9d0ec9b09bf4 (diff)
Add proper paths to learn- scripts
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@186 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xlearn-ham11
-rwxr-xr-xlearn-spam11
2 files changed, 20 insertions, 2 deletions
diff --git a/learn-ham b/learn-ham
index 3c2290f..6a345a8 100755
--- a/learn-ham
+++ b/learn-ham
@@ -2,7 +2,16 @@
set -e
-MAILDIR=/srv/mail/$LOGNAME-d/
+for dir in \
+ /srv/mail/$LOGNAME-d/ \
+ $HOME/Maildir \
+ ; do
+
+ MAILDIR="$dir"
+ if [ -d "$MAILDIR/.spam.learn" ] ; then
+ break
+ fi
+done
if [ -d "$MAILDIR/.xham.learn" ] ; then
cd "$MAILDIR/.xham.learn"
diff --git a/learn-spam b/learn-spam
index 44dd2d3..615d3c8 100755
--- a/learn-spam
+++ b/learn-spam
@@ -2,7 +2,16 @@
set -e
-MAILDIR=/srv/mail/$LOGNAME-d/
+for dir in \
+ /srv/mail/$LOGNAME-d/ \
+ $HOME/Maildir \
+ ; do
+
+ MAILDIR="$dir"
+ if [ -d "$MAILDIR/.spam.learn" ] ; then
+ break
+ fi
+done
if [ -d "$MAILDIR/.spam.learn" ] ; then
cd "$MAILDIR/.spam.learn"