]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-reply.rst
4f39a9597e8c13e118e95b34901709e2861be1c7
[notmuch] / doc / man1 / notmuch-reply.rst
1 .. _notmuch-reply(1):
2
3 =============
4 notmuch-reply
5 =============
6
7 SYNOPSIS
8 ========
9
10 **notmuch** **reply** [option ...] <*search-term*> ...
11
12 DESCRIPTION
13 ===========
14
15 Constructs a reply template for a set of messages.
16
17 To make replying to email easier, **notmuch reply** takes an existing
18 set of messages and constructs a suitable mail template. Its To:
19 address is set according to the original email in this way: if the
20 Reply-to: header is present and different from any To:/Cc: address it
21 is used, otherwise From: header is used. Unless
22 ``--reply-to=sender`` is specified, values from the To: and Cc: headers
23 are copied, but not including any of the current user's email addresses
24 (as configured in primary\_mail or other\_email in the .notmuch-config
25 file) in the recipient list.
26
27 It also builds a suitable new subject, including Re: at the front (if
28 not already present), and adding the message IDs of the messages being
29 replied to to the References list and setting the In-Reply-To: field
30 correctly.
31
32 Finally, the original contents of the emails are quoted by prefixing
33 each line with '> ' and included in the body.
34
35 The resulting message template is output to stdout.
36
37 Supported options for **reply** include
38
39 .. program:: reply
40
41 .. option:: --duplicate=N
42
43    Reply to duplicate number N. The numbering starts from 1, and
44    matches the order used by :option:`show --duplicate` and
45    :option:`search --output=files <search --output>`.
46
47 .. option:: --format=(default|json|sexp|headers-only)
48
49    default
50      Includes subject and quoted message body as an RFC 2822
51      message.
52
53    json
54      Produces JSON output containing headers for a reply message
55      and the contents of the original message. This output can be
56      used by a client to create a reply message intelligently.
57
58    sexp
59      Produces S-Expression output containing headers for a reply
60      message and the contents of the original message. This output
61      can be used by a client to create a reply message
62      intelligently.
63
64    headers-only
65      Only produces In-Reply-To, References, To, Cc, and Bcc
66      headers.
67
68 .. option:: --format-version=N
69
70    Use the specified structured output format version. This is
71    intended for programs that invoke :any:`notmuch(1)` internally. If
72    omitted, the latest supported version will be used.
73
74 .. option:: --reply-to=(all|sender)
75
76    all (default)
77      Replies to all addresses.
78
79    sender
80      Replies only to the sender. If replying to user's own message
81      (Reply-to: or From: header is one of the user's configured
82      email addresses), try To:, Cc:, and Bcc: headers in this
83      order, and copy values from the first that contains something
84      other than only the user's addresses.
85
86 .. option:: --decrypt=(false|auto|true)
87
88    If ``true``, decrypt any MIME encrypted parts found in the
89    selected content (i.e., "multipart/encrypted" parts). Status
90    of the decryption will be reported (currently only supported
91    with ``--format=json`` and ``--format=sexp``), and on successful
92    decryption the multipart/encrypted part will be replaced by
93    the decrypted content.
94
95    If ``auto``, and a session key is already known for the
96    message, then it will be decrypted, but notmuch will not try
97    to access the user's secret keys.
98
99    Use ``false`` to avoid even automatic decryption.
100
101    Non-automatic decryption expects a functioning
102    :manpage:`gpg-agent(1)` to provide any needed credentials. Without
103    one, the decryption will likely fail.
104
105    Default: ``auto``
106
107 See :any:`notmuch-search-terms(7)` for details of the supported syntax for
108 <search-terms>.
109
110 Note: It is most common to use **notmuch reply** with a search string
111 matching a single message, (such as id:<message-id>), but it can be
112 useful to reply to several messages at once. For example, when a series
113 of patches are sent in a single thread, replying to the entire thread
114 allows for the reply to comment on issues found in multiple patches. The
115 default format supports replying to multiple messages at once, but the
116 JSON and S-Expression formats do not.
117
118 EXIT STATUS
119 ===========
120
121 This command supports the following special exit status codes
122
123 ``20``
124     The requested format version is too old.
125
126 ``21``
127     The requested format version is too new.
128
129 SEE ALSO
130 ========
131
132 :any:`notmuch(1)`,
133 :any:`notmuch-config(1)`,
134 :any:`notmuch-count(1)`,
135 :any:`notmuch-dump(1)`,
136 :any:`notmuch-hooks(5)`,
137 :any:`notmuch-insert(1)`,
138 :any:`notmuch-new(1)`,
139 :any:`notmuch-restore(1)`,
140 :any:`notmuch-search(1)`,
141 :any:`notmuch-search-terms(7)`,
142 :any:`notmuch-show(1)`,
143 :any:`notmuch-tag(1)`