#!/bin/sh . $HOME/.shenv # Fix copies of my own mail returned to folder:inbox by mailing lists. This # is a workaround for a bug in notmuch; see . 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 [ -r "$HOME/doc/notmuch-killfile" ] && perl \ -we'length and system "notmuch", "tag", "-unread", "--", "($_)" for join ") or (", grep length, map s/^\s+|\s*(#.*)?$//gr, <>' \ "$HOME/doc/notmuch-killfile"