summaryrefslogtreecommitdiff
path: root/.fmail/.notmuch/hooks/post-new
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-06-12 10:59:15 +0100
committerSean Whitton <spwhitton@spwhitton.name>2017-06-12 10:59:15 +0100
commit40d8b7b1c0839adcc45d5fe7a118aae0c20e2cf9 (patch)
treeb7b81835fea2683549cd234717e6d3e1cdb1328c /.fmail/.notmuch/hooks/post-new
parenta8587f7b3f87a50ae071374ff87491c2a81c8b4a (diff)
downloaddotfiles-40d8b7b1c0839adcc45d5fe7a118aae0c20e2cf9.tar.gz
sync trash from FastMail and setup for deleting
Diffstat (limited to '.fmail/.notmuch/hooks/post-new')
-rwxr-xr-x.fmail/.notmuch/hooks/post-new9
1 files changed, 9 insertions, 0 deletions
diff --git a/.fmail/.notmuch/hooks/post-new b/.fmail/.notmuch/hooks/post-new
index 3f239be4..5e1ef6c9 100755
--- a/.fmail/.notmuch/hooks/post-new
+++ b/.fmail/.notmuch/hooks/post-new
@@ -35,3 +35,12 @@ fi
# mark all spam as spam
notmuch tag +spam -- folder:spam
+
+# ensure all deleted messages are in the trash folder
+floating_deleted=$(notmuch search --output=files -- tag:deleted)
+if [ ! -z "$floating_deleted" ]; then
+ mdmv $floating_deleted $HOME/.fmail/trash
+fi
+
+# mark all trash as trash
+notmuch tag +deleted -- folder:trash