Notmuch mail
notmuch
is a powerful command-line email client and indexer that allows you to manage and search your email archives. Here are some basic commands to get you started:
Indexing your email
Before you can use notmuch
, you need to index your email archives. You can do this by running the following command:
notmuch new
This command will create a new database and index your email archives.
Searching your email
Once your email archives are indexed, you can use the following command to search for emails:
notmuch search <search_term>
Replace <search_term>
with the term you want to search for. notmuch
will return a list of emails that match your search query.
Viewing an email
To view an email, use the following command:
notmuch show <email_id>
Replace <email_id>
with the ID of the email you want to view. You can find the email ID by running notmuch search
and looking at the output.
Deleting an email
To delete an email, use the following command:
notmuch delete <email_id>
Replace <email_id>
with the ID of the email you want to delete.
Other commands
Here are some other useful notmuch
commands:
notmuch tag <tag> <email_id>
: Add a tag to an email.notmuch untag <tag> <email_id>
: Remove a tag from an email.notmuch thread <email_id>
: View the thread of an email.notmuch label <label> <email_id>
: Add a label to an email.notmuch unlabel <label> <email_id>
: Remove a label from an email.
Configuring notmuch
You can configure notmuch
by editing the ~/.notmuch/config
file. This file contains settings such as the location of your email archives and the default search query.
Tips and tricks
Here are some tips and tricks to help you get the most out of notmuch
:
- Use the
--threads
option with thesearch
command to view emails in threads. - Use the
--format
option with theshow
command to view emails in a specific format (e.g.,--format=plain
to view emails in plain text). - Use the
--sort
option with thesearch
command to sort the results by a specific field (e.g.,--sort=subject
to sort by subject). - Use the
--limit
option with thesearch
command to limit the number of results returned.