]> git.cworth.org Git - notmuch-wiki/blob - initial_tagging.mdwn
add some more info to the initial tagging page
[notmuch-wiki] / initial_tagging.mdwn
1 # Approaches to initial tagging of messages
2
3 This page collects scripts and strategies for organizing mail using
4 notmuch and doing automated initial tagging.
5
6 Here's a very general and ad-hoc approach to initial message tagging.
7 The [new] config section allows you to control which tags new messages
8 receive.  This sets all new messages to get the "new" tag:
9
10     [new]
11     tags=new;
12
13 After running "notmuch new", all new messages will be marked "new".
14 You can then do various tag post-processing by just acting on messages
15 with that tag.  For instance, a post-processing script might do the
16 following:
17
18     # immediately archive all messages from "me"
19     notmuch tag -new -- tag:new and from:me@example.com
20
21     # delete all messages from a spammer:
22     notmuch tag +deleted -- from:spam@spam.com
23
24     # tag all message from notmuch mailing list
25     notmuch tag +notmuch -- to:notmuch@notmuchmail.org
26
27     # finally, retag all "new" messages s "inbox" and "unread"
28     notmuch tag +inbox +unread -new -- tag:new
29
30 Since the post-processing is only acting on a few messages, it is
31 generally extrememly fast.
32
33 ## Other solutions
34
35 * [This
36   email](http://notmuchmail.org/pipermail/notmuch/2010/001691.html)
37   (and related thread) details Carl Worth's approach to tagging. It is
38   email id:87r5o8stbj.fsf@yoom.home.cworth.org in the notmuch mailing
39   list archives.
40
41
42 * [This
43   email](http://notmuchmail.org/pipermail/notmuch/2010/001690.html)
44   (and related thread) details one user's setup, which includes using
45   the inbox tag as a "new mail" flag. It is email
46   id:87hbp5j9dv.fsf@hackervisions.org in the notmuch mailing list
47   archives.