configuration/local/bin/spam

14 lines
295 B
Plaintext
Raw Normal View History

2019-08-27 19:56:05 +02:00
#!/bin/sh
set -e
2019-08-27 19:56:05 +02:00
for mid in $(notmuch search --output=messages tag:inbox "$@"); do
printf "%s ? " "$(notmuch show "$mid" | sed -n 's/Subject: //p')"
read ans
case "$ans" in
y*)
notmuch show --format=raw "$mid" | bogofilter -Sn
notmuch tag -inbox -unread +spam -- "$mid"
;;
esac
done