summaryrefslogtreecommitdiff
path: root/.fmail
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-06-10 09:36:22 +0100
committerSean Whitton <spwhitton@spwhitton.name>2017-06-10 09:36:22 +0100
commit6843d21b11e9e36184709acd98fb91ac1d4d5e9a (patch)
tree85fcf5a1066b080470b22b87ebe6af4f952a8896 /.fmail
parent49494be5b387c590573c437df77e0b397fadfa02 (diff)
downloaddotfiles-6843d21b11e9e36184709acd98fb91ac1d4d5e9a.tar.gz
notmuch tagging hooks and killed thread handling
Diffstat (limited to '.fmail')
-rwxr-xr-x.fmail/.notmuch/hooks/post-new13
1 files changed, 13 insertions, 0 deletions
diff --git a/.fmail/.notmuch/hooks/post-new b/.fmail/.notmuch/hooks/post-new
new file mode 100755
index 00000000..c09c81a1
--- /dev/null
+++ b/.fmail/.notmuch/hooks/post-new
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# mark all sent mail as read
+notmuch tag -unread -- folder:sent
+
+# mark all drafts as drafts, and as read
+notmuch tag -unread +draft -- folder:drafts
+
+# propagate the 'killed' tag to all messages in the killed message's thread
+killed_threads=$(notmuch search --output=threads tag:killed)
+if [ ! -z "$killed_threads" ]; then
+ notmuch tag +killed -- $killed_threads
+fi