blob: e10c48246c593af07519ff2c92d48bfe357d2cd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/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
killed_threads=$(notmuch search --output=threads -- tag:spw::killed)
if [ ! -z "$killed_threads" ]; then
notmuch tag -unread -- $killed_threads
fi
|