configuration/local/bin/spam
2020-11-14 14:39:47 +01:00

14 lines
295 B
Bash
Executable File

#!/bin/sh
set -e
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