summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"