1NOTMUCH-SHOW(1)                     notmuch                    NOTMUCH-SHOW(1)
2
3
4

NAME

6       notmuch-show - show messages matching the given search terms
7

SYNOPSIS

9       notmuch show [option ...] <search-term> ...
10

DESCRIPTION

12       Shows all messages matching the search terms.
13
14       See  notmuch-search-terms(7)  for  details  of the supported syntax for
15       <search-terms>.
16
17       The messages will be grouped and sorted based  on  the  threading  (all
18       replies to a particular message will appear immediately after that mes‐
19       sage in date order). The output is not indented by default,  but  depth
20       tags  are  printed  so  that  proper  indentation can be performed by a
21       post-processor (such as the emacs interface to notmuch).
22
23       Supported options for show include
24
25       --entire-thread=(true|false)
26              If true, notmuch show outputs all messages in the thread of  any
27              message matching the search terms; if false, it outputs only the
28              matching messages. For --format=json and --format=sexp this  de‐
29              faults to true. For other formats, this defaults to false.
30
31       --format=(text|json|sexp|mbox|raw)
32
33              text (default for messages)
34                     The  default  plain-text format has all text-content MIME
35                     parts decoded. Various components in  the  output,  (mes‐
36                     sage,  header,  body, attachment, and MIME part), will be
37                     delimited by easily-parsed markers. Each marker  consists
38                     of  a Control-L character (ASCII decimal 12), the name of
39                     the marker, and then either an opening or closing  brace,
40                     ('{'  or '}'), to either open or close the component. For
41                     a multipart MIME message, these parts will be nested.
42
43              json   The output is formatted with Javascript  Object  Notation
44                     (JSON).  This  format is more robust than the text format
45                     for automated processing. The nested structure of  multi‐
46                     part MIME messages is reflected in nested JSON output. By
47                     default JSON output includes all messages in  a  matching
48                     thread;  that  is,  by  default, --format=json sets --en‐
49                     tire-thread. The caller can  disable  this  behaviour  by
50                     setting --entire-thread=false.  The JSON output is always
51                     encoded as UTF-8 and any message content included in  the
52                     output will be charset-converted to UTF-8.
53
54              sexp   The  output  is formatted as the Lisp s-expression (sexp)
55                     equivalent of the JSON format above. Objects are  format‐
56                     ted  as  property  lists whose keys are keywords (symbols
57                     preceded by a colon). True is formatted  as  t  and  both
58                     false  and  null  are  formatted as nil. As for JSON, the
59                     s-expression output is always encoded as UTF-8.
60
61              mbox   All matching messages are output in the traditional, Unix
62                     mbox  format  with  each message being prefixed by a line
63                     beginning with "From " and a blank line  separating  each
64                     message.  Lines  in  the  message  content beginning with
65                     "From " (preceded by zero or more '>' characters) have an
66                     additional  '>' character added. This reversible escaping
67                     is termed "mboxrd" format and described in detail here:
68                        http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
69
70              raw (default if --part is given)
71                     Write  the  raw bytes of the given MIME part of a message
72                     to standard out. For this format, it is an error to spec‐
73                     ify a query that matches more than one message.
74
75                     If  the  specified  part is a leaf part, this outputs the
76                     body of the part after performing content transfer decod‐
77                     ing  (but  no  charset  conversion). This is suitable for
78                     saving attachments, for example.
79
80                     For a multipart or message part, the output includes  the
81                     part  headers  as  well  as the body (including all child
82                     parts). No decoding is performed  because  multipart  and
83                     message  parts  cannot  have non-trivial content transfer
84                     encoding. Consumers of this may need  to  implement  MIME
85                     decoding and similar functions.
86
87       --format-version=N
88              Use  the specified structured output format version. This is in‐
89              tended for programs that invoke notmuch(1) internally. If  omit‐
90              ted, the latest supported version will be used.
91
92       --part=N
93              Output  the  single decoded MIME part N of a single message. The
94              search terms must match only a single message. Message parts are
95              numbered  in  a  depth-first walk of the message MIME structure,
96              and are identified in the 'json', 'sexp' or 'text'  output  for‐
97              mats.
98
99              Note that even a message with no MIME structure or a single body
100              part still has two MIME parts:  part  0  is  the  whole  message
101              (headers and body) and part 1 is just the body.
102
103       --sort=(newest-first|oldest-first)
104              This option can be used to present results in either chronologi‐
105              cal order (oldest-first) or reverse  chronological  order  (new‐
106              est-first).
107
108              Only  threads  as  a  whole are reordered.  Ordering of messages
109              within each thread will not be affected by this flag, since that
110              order is always determined by the thread's replies.
111
112              By  default,  results will be displayed in reverse chronological
113              order, (that is, the newest results will be displayed first).
114
115       --verify
116              Compute and report the validity of any MIME cryptographic signa‐
117              tures  found  in  the selected content (e.g., "multipart/signed"
118              parts). Status of the signature will be reported (currently only
119              supported  with --format=json and --format=sexp), and the multi‐
120              part/signed part will be replaced by the signed data.
121
122       --decrypt=(false|auto|true|stash)
123              If true, decrypt any MIME encrypted parts found in the  selected
124              content  (e.g.,  "multipart/encrypted" parts). Status of the de‐
125              cryption will be reported (currently only supported with  --for‐
126              mat=json  and  --format=sexp)  and  on successful decryption the
127              multipart/encrypted part will be replaced by the decrypted  con‐
128              tent.
129
130              stash  behaves like true, but upon successful decryption it will
131              also stash the message's session key in the database, and  index
132              the  cleartext  of the message, enabling automatic decryption in
133              the future.
134
135              If auto, and a session key is already  known  for  the  message,
136              then  it  will  be decrypted, but notmuch will not try to access
137              the user's keys.
138
139              Use false to avoid even automatic decryption.
140
141              Non-automatic decryption (stash or true, in  the  absence  of  a
142              stashed  session key) expects a functioning gpg-agent(1) to pro‐
143              vide any needed credentials. Without one,  the  decryption  will
144              fail.
145
146              Note: setting either true or stash here implies --verify.
147
148              Here is a table that summarizes each of these policies:
149
150                       ┌──────────────┬───────┬──────┬──────┬───────┐
151                       │              │ false │ auto │ true │ stash │
152                       ├──────────────┼───────┼──────┼──────┼───────┤
153                       │Show  cleart‐ │       │ X    │ X    │ X     │
154                       │ext  if  ses‐ │       │      │      │       │
155                       │sion  key  is │       │      │      │       │
156                       │already known │       │      │      │       │
157                       ├──────────────┼───────┼──────┼──────┼───────┤
158                       │Use    secret │       │      │ X    │ X     │
159                       │keys  to show │       │      │      │       │
160                       │cleartext     │       │      │      │       │
161                       ├──────────────┼───────┼──────┼──────┼───────┤
162                       │Stash     any │       │      │      │ X     │
163                       │newly  recov‐ │       │      │      │       │
164                       │ered  session │       │      │      │       │
165                       │keys,   rein‐ │       │      │      │       │
166                       │dexing   mes‐ │       │      │      │       │
167                       │sage if found │       │      │      │       │
168                       └──────────────┴───────┴──────┴──────┴───────┘
169
170              Note:  --decrypt=stash  requires  write  access to the database.
171              Otherwise, notmuch show operates entirely in read-only mode.
172
173              Default: auto
174
175       --exclude=(true|false)
176              Specify  whether  to  omit  threads  only  matching   search.ex‐
177              clude_tags  from the search results (the default) or not. In ei‐
178              ther case the excluded message will be marked with  the  exclude
179              flag  (except  when output=mbox when there is nowhere to put the
180              flag).
181
182              If --entire-thread is specified then complete  threads  are  re‐
183              turned  regardless (with the excluded flag being set when appro‐
184              priate) but threads that only match in an excluded  message  are
185              not returned when --exclude=true.
186
187              The default is --exclude=true.
188
189       --body=(true|false)
190              If  true  (the  default) notmuch show includes the bodies of the
191              messages  in  the  output;  if  false,   bodies   are   omitted.
192              --body=false  is  only  implemented  for the text, json and sexp
193              formats and it is incompatible with --part > 0.
194
195              This is useful if the caller only needs the headers as body-less
196              output is much faster and substantially smaller.
197
198       --include-html
199              Include  "text/html" parts as part of the output (currently only
200              supported with --format=text, --format=json and  --format=sexp).
201              By default, unless --part=N is used to select a specific part or
202              --include-html is used to include all "text/html" parts, no part
203              with content type "text/html" is included in the output.
204
205       A  common  use  of  notmuch show is to display a single thread of email
206       messages. For this, use a search term of "thread:<thread-id>" as can be
207       seen in the first column of output from the notmuch-search(1) command.
208

EXIT STATUS

210       This command supports the following special exit status codes
211
212       20     The requested format version is too old.
213
214       21     The requested format version is too new.
215

SEE ALSO

217       notmuch(1),  notmuch-config(1), notmuch-count(1), notmuch-dump(1), not‐
218       much-hooks(5),  notmuch-insert(1),  notmuch-new(1),   notmuch-reply(1),
219       notmuch-restore(1),  notmuch-search(1),  notmuch-search-terms(7),  not‐
220       much-tag(1)
221

AUTHOR

223       Carl Worth and many others
224
226       2009-2021, Carl Worth and many others
227
228
229
230
2310.34.1                           Nov 03, 2021                  NOTMUCH-SHOW(1)
Impressum