NOTMUCH-ADDRESS(1)

๐ŸŒธ NOTMUCH-ADDRESS โ€” the "who even are these people" command โœจ

okay bestie, welcome to notmuch-address from the notmuch manual, version 0.40 โ€” yes I folded the manual name in up top like a little name tag, you're welcome ๐ŸŽ€


๐Ÿ’Œ NAME

notmuch-address โ€” it spits out addresses from the messages that match your search. that's the whole vibe ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS

notmuch address [option ...] <search-term> ...

โœจ DESCRIPTION

So here's the tea โ˜• โ€” you give it some search terms, it finds every message that matches, and then it shows you the addresses hiding in those messages. And because nobody wants to see the same address forty-seven times, duplicate addresses get filtered out. obsessed. ๐Ÿซถ

If you wanna know what syntax you can actually put in those <search-terms>, go read notmuch-search-terms โ€” that's where the whole grammar situation lives, iykyk.

The options it supports are giving very demure, very mindful:

  • --format=(json|sexp|text|text0) โ€” pick how your results come out:
    • json โ€” JSON, obviously
    • sexp โ€” S-Expressions
    • text โ€” plain text separated by newline characters. this is the default, no cap
    • text0 โ€” plain text separated by null characters, which is the move if you're piping into xargs(1) with its -0 option (where that option exists on your system, bestie, it's not everywhere ๐Ÿ’€)
  • --format-version=N โ€” use this specific version of the structured output format. it's meant for programs that call notmuch internally, so like, tooling, not you-and-your-terminal-at-2am. if you skip it, the latest supported version gets used. slay โœจ
  • --output=(sender|recipients|count|address) โ€” controls what info actually shows up in the output. and here's the cute part: you can pass this option multiple times to mash different outputs together ๐Ÿ’–. and if you give it neither --output=sender nor --output=recipients, then --output=sender is just implied. it chose for you. main character behavior ๐Ÿ‘‘
    • sender โ€” output every address from the From header.
Note: searching for sender should be way faster than searching for recipients, because sender addresses are cached directly in the database, whereas the other addresses have to be fetched from the message files. so, like, speedrun strats ๐Ÿƒโ™€๏ธ
  • recipients โ€” output every address from the To, Cc and Bcc headers.
  • count โ€” print how many times each address was encountered during the search.
Note: with this option, addresses only get printed after the whole search is finished. this may take a long time. like, go make a snack, fr fr ๐Ÿ˜ญ
  • address โ€” output only the email addresses, instead of the full mailboxes with names and email addresses attached. heads up though: this option does nothing for the JSON or S-Expression output formats. it just sits there. no thoughts, head empty ๐Ÿš
  • --deduplicate=(no|mailbox|address) โ€” controls how results get deduplicated, aka how we stop the same person showing up like twelve times.
    • no โ€” output all occurrences of addresses in the matching messages. absolutely no filtering. but heads up, this one is not applicable with --output=count. ๐Ÿšซ
    • mailbox โ€” deduplicate based on the full, case sensitive name and email address โ€” a whole mailbox. this is basically the same as piping the --deduplicate=no output into sort | uniq, except the order of results is different. and guess what, this is the default. the moment. the icon. โญ
    • address โ€” deduplicate based on the case insensitive address part of the mailbox. of all the variants (different name, different case, whatever), it prints the one occurring most frequently among the matching messages. and if --output=count is specified, it includes all the variants in the count. thorough queen ๐ŸŒˆ
  • --sort=(newest-first|oldest-first) โ€” present results either chronologically (oldest-first) or reverse chronologically (newest-first).

By default, results show up in reverse chronological order, meaning the newest results come first. fresh off the press ๐Ÿ’…

BUT โ€” and this is the plot twist โ€” if either --output=count or --deduplicate=address is specified, this option gets ignored and the order of the results is unspecified. so don't come for me when the order's weird, it said what it said ๐Ÿ™ˆ

  • --exclude=(true|false) โ€” okay so a message is called "excluded" if it matches at least one tag in search.exclude_tags that does not appear explicitly in the search terms. this option decides whether excluded messages get omitted from the search process.

The default value, true, prevents excluded messages from matching the search terms. keep them out, we don't know them ๐Ÿšช

false allows excluded messages to match search terms and appear in the displayed results. let them in, invite the chaos ๐ŸŽ‰


๐Ÿšฆ EXIT STATUS

This command supports these special exit status codes, and yes they're very specific:

  1. 20 โ€” the requested format version is too old. grandmacore ๐Ÿ‘ต
  2. 21 โ€” the requested format version is too new. stop living in the future bestie ๐Ÿ”ฎ

๐Ÿ‘€ SEE ALSO

your reading list, go off ๐Ÿ“š:

  • notmuch
  • notmuch-config
  • notmuch-count
  • notmuch-dump
  • notmuch-hooks
  • notmuch-insert
  • notmuch-new
  • notmuch-reply
  • notmuch-restore
  • notmuch-search
  • notmuch-search-terms
  • notmuch-show
  • notmuch-tag

๐Ÿ‘‘ Author

Carl Worth and many others โ€” legends, every single one ๐Ÿ’œ

2009-2026, Carl Worth and many others


and that's the whole page babes ๐ŸŽ€ this was notmuch-address, version 0.40, dated Jan 31, 2026 โ€” go find those addresses, you got this ๐Ÿฆ‹๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from