blob: c508b644db9df8e12d4a05191a32f57d1d7adc22 (
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
26
27
28
29
30
31
32
|
#!/bin/sh
. $HOME/.shenv
# The primary purpose of my pre-new and post-new scripts is to
# maintain the 'draft', 'spam', 'deleted' and 'unread' tags such that
# the only data in the notmuch database that cannot be reproduced from
# the Maildir is which threads have been killed, which is not
# important information. Then there is no need to sync the notmuch
# database between machines. Syncing the maildir with mbsync(1) is
# sufficient.
# Note that another aspect of this setup is not using an 'inbox' tag.
# In this script (actually within movemymail), we move mail according to
# tags that may have been added since the last 'notmuch new' run.
# Then we sync with my IMAP server. Then in the post-new script we
# add tags to new messages in particular folders
# Before considering adding use of a new tag, which would require me
# to do some sort of sync/backup of my notmuch database, consider
# whether simply flagging messages could be sufficient to track
# whatever needs to be tracked
offline || movemymail
# config stored in the database
notmuch config set index.header.List List-Id
notmuch config set index.header.Team X-Distro-Tracker-Team
# ensure that notmuch is able to detect renames by my annexfmail script
ionice -c 3 expand-annex-mboxes
|