aboutsummaryrefslogtreecommitdiffstats
path: root/learn-spam
blob: 1d190558ac1ab89a878a29efbfc7d39658e7db0d (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash

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 -s "$MAILDIR"/learn-spam -r
rsync "$MAILDIR"/spambayes.db \
      kyrias@theos.kyriasis.com:Mail/spambayes.db \
      --update --checksum --human-readable --progress