diff options
Diffstat (limited to 'learn-ham')
-rwxr-xr-x | learn-ham | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,6 +1,11 @@ #!/usr/bin/env bash -sb_mboxtrain.py -d "$MAIL"/spambayes.db -g "$MAIL"/learn-ham -r -rsync "$MAIL"/spambayes.db \ +if ! [[ -n "$MAILDIR" ]]; then + printf '%s\n' 'warning: $MAILDIR not set, falling back to $HOME/mail' + MAILDIR="$HOME"/mail +fi + +sb_mboxtrain.py -d "$MAILDIR"/spambayes.db -g "$MAILDIR"/learn-ham -r +rsync "$MAILDIR"/spambayes.db \ kyrias@theos.kyriasis.com:Mail/spambayes.db \ --update --checksum --human-readable --progress |