automate training the spam filter

This commit is contained in:
Felix Van der Jeugt 2019-08-27 19:56:05 +02:00
parent 30985b7dfc
commit 4a5c200404
No known key found for this signature in database
GPG Key ID: 58B209295023754D
1 changed files with 15 additions and 0 deletions

15
local/bin/spam Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
mid="id:$1"
file="$(notmuch show "$mid" | sed -n '1s/.*filename:\([^ ]*\).*/\1/p')"
temp="$(mktemp)"
cat > "$temp" <<HERE
References: <$1>
HERE
alot compose --sender felix.vanderjeugt@ugent.be \
--template="$temp" \
--subject spam \
--to spam@ugent.be \
--attach "$file"