summaryrefslogtreecommitdiff
path: root/.fmail/.notmuch/hooks/post-new
blob: 8943706328da3e520a49380b00314429ed60b474 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

. $HOME/.shenv

# Mark all sent mail as read.  mark it as unread first to ensure that
# copies of the mail in other folders actually get their maildir Seen
# flag added.  This is a bug in notmuch; see id:87r1ypsb1p.fsf@tethera.net
notmuch tag +unread -- folder:sent
notmuch tag -unread -- folder:sent

# mark all drafts as drafts, and as read
notmuch tag -unread +draft -- folder:drafts

# mark all spam as spam
notmuch tag +spam -- folder:spam

# mark all trash as trash
notmuch tag +deleted -- folder:trash

# mark messages as read in threads I've killed.  don't propagate the
# spw::killed tag itself
notmuch tag -unread -- 'thread:{tag:spw::killed}'