NOTMUCH-MUTT(1)
π NOTMUCH-MUTT π
okay bestie, so this is notmuch-mutt from the User Contributed Perl Documentation section of the manual, and it is literally the little glue goblin that makes your notmuch and your Mutt hold hands. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
notmuch-mutt β notmuch (of a) helper for Mutt πΈ
β¨ SYNOPSIS β¨
notmuch-mutt [OPTION]... search [SEARCH-TERM]...
notmuch-mutt [OPTION]... thread < MAIL
notmuch-mutt [OPTION]... tag [TAGS]... < MAIL
β¨ DESCRIPTION β¨
so notmuch-mutt is a frontend to the notmuch mail indexer, and its whole job is populating a maildir with your search results. that's it. that's the vibe. it takes your queries and turns them into an actual folder you can wander around in π
β¨ OPTIONS β¨
-o DIR,--output-dir DIRβ stash your search results as (symlink) messages under the maildir called DIR. > β οΈ beware bestie: DIR is gonna get overwritten. like, gone. (Default:~/.cache/notmuch/mutt/results/) π-p,--promptβ instead of pulling search terms off the command line, it prompts you for them. (only works for"search"btw, don't try it anywhere else π)-r,--remove-dupsβ yeets emails with duplicate message-ids out of your search results. (it does this by passing--duplicate=1to thenotmuch searchcommand.) > β οΈ heads up: this can hide search results if an email accidentally or maliciously uses the same message-id as a different email. so like, useful, but also a little unhinged. π-h,--helpβ shows you the usage info and dips. iconic. β¨
π INTEGRATION WITH MUTT π
you can use notmuch-mutt to integrate notmuch with the Mutt mail user agent (shocking, I know, given the name π). to make that happen you gotta define macros in your Mutt config. that file is usually one of: ~/.muttrc, /etc/Muttrc, or a config snippet hanging out under /etc/Muttrc.d/. so pick your fighter and paste these in:
macro index <F8> \
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
<shell-escape>notmuch-mutt -r --prompt search<enter>\
<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
"notmuch: search mail"
macro index <F9> \
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
<pipe-message>notmuch-mutt -r thread<enter>\
<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
"notmuch: reconstruct thread"
macro index <F6> \
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
<pipe-message>notmuch-mutt tag -- -inbox<enter>\
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
"notmuch: remove message from inbox"
let me break down what each of these lil guys does, because the way they ate π :
- the first macro, the one that fires on
<F8>, prompts you for notmuch search terms and then jumps you to a temporary maildir showing off your search results. main character energy fr fr. - the second macro,
<F9>, reconstructs the thread that corresponds to your current mail and shows it as search results. thread glow-up β¨ - the third macro,
<F6>, removes the tag"inbox"from the current message. and because you can just change that"-inbox"bit, you can customise this macro to add or remove whatever tags fit your notmuch work-flow. bespoke. π
and to keep your notmuch index current you should periodically run "notmuch new". depending on your local mail setup you might wanna do that via cron, or as a hook triggered by mail retrieval, etc. whatever fits your setup, no judgement π¦
β¨ SEE ALSO β¨
mutt(1), notmuch(1) πΈ
β¨ AUTHOR β¨
- Copyright: (C) 2011-2012 Stefano Zacchiroli
<zack@upsilon.cc>π - License: GNU General Public License (GPL), version 3 or higher π
okay that's the whole page bestie, you're officially fluent π this was perl v5.42.0, dated 2026-01-31, and it's the NOTMUCH-MUTT(1) page from the User Contributed Perl Documentation β mwah, go search something iconic ππβ¨
π¦ where this page comes from
- fedora 43: notmuch-mutt 0.40-1.fc43 Β· GPL-3.0-or-later
- fedora 44: notmuch-mutt 0.40-1.fc44 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms