Organising Email with Tags#
This tutorial uses Notmuch tags to build a simple, repeatable workflow. If Notmuch is not set up yet, start with How to Use Notmuch.
What Are Tags?#
Tags are labels attached to messages. One message can have many tags, and tags can drive virtual mailboxes.
Set Up Notmuch for Tagging#
Install and initialize notmuch.
Configure NeoMutt with a notmuch URL:
set nm_default_url = "notmuch:///path/to/your/maildir"
Add a virtual mailbox for your inbox tag:
named-mailboxes "Inbox" "notmuch://?query=tag:inbox"
Expected result: you can open the Inbox virtual mailbox from NeoMutt.
Add and Remove Tags#
Bind a key for tagging if you do not already have one:
bind index,pager \eT modify-tags
Open a message and press Alt-T.
Add or remove tags as prompted.
Expected result: the message tags change in the notmuch database.
Search by Tags#
Use a notmuch query to open a tagged view:
named-mailboxes "Action" "notmuch://?query=tag:action"
Open the mailbox.
Expected result: you see only messages with the action tag.
Create Virtual Mailboxes from Tags#
Add more tag-based mailboxes:
named-mailboxes "Waiting" "notmuch://?query=tag:waiting"
named-mailboxes "Reference" "notmuch://?query=tag:reference"
Open each mailbox and confirm the filters.
Expected result: virtual mailboxes map directly to tag queries.
Build a Tag-Based Workflow#
Triage your inbox and tag items as
action,waiting, orreference.Remove the
inboxtag from items once they are triaged.
Expected result: the Inbox mailbox becomes a short list of untriaged items.
Display Tags in the Index#
Update your index format to show tags:
set index_format = "%4C %Z %{%b %d} %-15.15F %g %s"
Expected result: tags appear next to messages in the index.
See How to Use Notmuch for full configuration details.
Next Steps#
βI want to search by tag quickly.β Continue with Searching and Filtering Email.
βI want to tune my index view.β See Format Strings and Index Format.